TextExtractorRegistry implements SingletonInterface

Registry for text extractors, which are registered as tagged services via the #[AsTextExtractor] attribute or the 'fal.text_extractor' service tag. Extractors are ordered by their tag priority, an extractor with a higher priority is asked first whether it can extract text from a file.

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$instances  : array<string|int, TextExtractorInterface>|null
Instance cache for text extractor classes
$textExtractors  : iterable<string|int, mixed>

Methods

__construct()  : mixed
getTextExtractor()  : TextExtractorInterface|null
Checks whether any registered text extractor can deal with a given file and returns it.
registerTextExtractor()  : void
getTextExtractorInstances()  : array<string|int, TextExtractorInterface>
Get all registered text extractor instances

Properties

$textExtractors read-only

protected iterable<string|int, mixed> $textExtractors = []

Methods

registerTextExtractor()

public registerTextExtractor(string $className) : void
Deprecated

since TYPO3 v15.0, this method is a no-op and will be removed in TYPO3 v16.0. Register the text extractor as a tagged service using the #[AsTextExtractor] attribute instead.

Parameters
$className : string
On this page

Search results