ExtractorInterface

An Interface for MetaData extractors the FAL Indexer uses

Table of Contents

Methods

canProcess()  : bool
Checks if the given file can be processed by this Extractor
extractMetaData()  : array<string|int, mixed>
The actual processing TASK
getDriverRestrictions()  : array<string|int, mixed>
Get all supported DriverClasses
getExecutionPriority()  : int
Returns the execution priority of the extraction Service Should be between 1 and 100, 100 means runs as first service, 1 runs at last service
getFileTypeRestrictions()  : array<string|int, mixed>
Returns an array of supported file types; An empty array indicates all filetypes
getPriority()  : int
Returns the data priority of the extraction Service.

Methods

canProcess()

Checks if the given file can be processed by this Extractor

public canProcess(File $file) : bool
Parameters
$file : File
Return values
bool

extractMetaData()

The actual processing TASK

public extractMetaData(File $file[, array<string|int, mixed> $previousExtractedData = [] ]) : array<string|int, mixed>

Should return an array with database properties for sys_file_metadata to write

Parameters
$file : File
$previousExtractedData : array<string|int, mixed> = []

optional, contains the array of already extracted data

Return values
array<string|int, mixed>

getDriverRestrictions()

Get all supported DriverClasses

public getDriverRestrictions() : array<string|int, mixed>

Since some extractors may only work for local files, and other extractors are especially made for grabbing data from remote.

Returns array of string with driver names of Drivers which are supported, If the driver did not register a name, it's the classname. empty array indicates no restrictions

Return values
array<string|int, mixed>

getExecutionPriority()

Returns the execution priority of the extraction Service Should be between 1 and 100, 100 means runs as first service, 1 runs at last service

public getExecutionPriority() : int
Return values
int

getFileTypeRestrictions()

Returns an array of supported file types; An empty array indicates all filetypes

public getFileTypeRestrictions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPriority()

Returns the data priority of the extraction Service.

public getPriority() : int

Defines the precedence of Data if several extractors extracted the same property.

Should be between 1 and 100, 100 is more important than 1

Return values
int

        
On this page

Search results