ExtractorRegistry implements SingletonInterface

Registry for MetaData extraction Services

Table of Contents

Interfaces

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

Properties

$extractors  : array<string|int, mixed>
Registered ClassNames
$instances  : array<string|int, ExtractorInterface>
Instance Cache for Extractors

Methods

getExtractors()  : array<string|int, ExtractorInterface>
Get all registered extractors
getExtractorsWithDriverSupport()  : array<string|int, ExtractorInterface>
Get Extractors which work for a special driver
registerExtractionService()  : mixed
Allows to register MetaData extraction to the FAL Indexer
compareExtractorPriority()  : int
Compare the priority of two Extractor classes.
createExtractorInstance()  : ExtractorInterface
Create an instance of a Metadata Extractor

Properties

$extractors

Registered ClassNames

protected array<string|int, mixed> $extractors = []

Methods

getExtractorsWithDriverSupport()

Get Extractors which work for a special driver

public getExtractorsWithDriverSupport(string $driverType) : array<string|int, ExtractorInterface>
Parameters
$driverType : string
Return values
array<string|int, ExtractorInterface>

registerExtractionService()

Allows to register MetaData extraction to the FAL Indexer

public registerExtractionService(string $className) : mixed
Parameters
$className : string
Tags
throws
InvalidArgumentException

compareExtractorPriority()

Compare the priority of two Extractor classes.

protected compareExtractorPriority(ExtractorInterface $extractorA, ExtractorInterface $extractorB) : int

Is used for sorting array of Extractor instances by priority. We want the result to be ordered from high to low so a higher priority comes before a lower.

Parameters
$extractorA : ExtractorInterface
$extractorB : ExtractorInterface
Return values
int

-1 a > b, 0 a == b, 1 a < b


        
On this page

Search results