Indexer implements LoggerAwareInterface uses LoggerAwareTrait
The FAL Indexer
Table of Contents
Interfaces
- LoggerAwareInterface
Properties
- $extractorService : ExtractorService
- $filesToUpdate : array<string|int, mixed>
- $identifiedFileUids : array<string|int, int>
- $storage : ResourceStorage
Methods
- __construct() : mixed
- createIndexEntry() : File
- Create index entry
- extractMetaData() : mixed
- Extract metadata for given fileObject
- processChangesInStorages() : mixed
- runMetaDataExtraction() : mixed
- updateIndexEntry() : File
- Update index entry
- detectChangedFilesInStorage() : mixed
- Adds updated files to the processing queue
- detectMissingFiles() : mixed
- Since by now all files in filesystem have been looked at it is save to assume, that files that are in indexed but not touched in this run are missing
- extractRequiredMetaData() : array<string|int, mixed>
- Since the core desperately needs image sizes in metadata table put them there This should be called after every "content" update and "record" creation
- gatherFileInformationArray() : array<string|int, mixed>
- Collects the information to be cached in sys_file
- getExtractorService() : ExtractorService
- getFileIndexRepository() : FileIndexRepository
- Returns an instance of the FileIndexRepository
- getFileType() : string
- Maps the mimetype to a sys_file table type
- getMetaDataRepository() : MetaDataRepository
- Returns an instance of the FileIndexRepository
- getResourceFactory() : ResourceFactory
- Returns the ResourceFactory
- isFileTypeSupportedByExtractor() : bool
- Check whether the extractor service supports this file according to file type restrictions.
- processChangedAndNewFiles() : mixed
- Processes the Files which have been detected as "changed or new" in the storage
- transformFromDriverFileInfoArrayToFileObjectFormat() : array<string|int, mixed>
- However it happened, the properties of a file object which are persisted to the database are named different than the properties the driver returns in getFileInfo.
Properties
$extractorService
protected
ExtractorService
$extractorService
$filesToUpdate
protected
array<string|int, mixed>
$filesToUpdate
= []
$identifiedFileUids
protected
array<string|int, int>
$identifiedFileUids
= []
$storage
protected
ResourceStorage
$storage
Methods
__construct()
public
__construct(ResourceStorage $storage) : mixed
Parameters
- $storage : ResourceStorage
createIndexEntry()
Create index entry
public
createIndexEntry(string $identifier) : File
Parameters
- $identifier : string
Tags
Return values
FileextractMetaData()
Extract metadata for given fileObject
public
extractMetaData(File $fileObject) : mixed
Parameters
- $fileObject : File
processChangesInStorages()
public
processChangesInStorages() : mixed
runMetaDataExtraction()
public
runMetaDataExtraction([int $maximumFileCount = -1 ]) : mixed
Parameters
- $maximumFileCount : int = -1
updateIndexEntry()
Update index entry
public
updateIndexEntry(File $fileObject) : File
Parameters
- $fileObject : File
Return values
FiledetectChangedFilesInStorage()
Adds updated files to the processing queue
protected
detectChangedFilesInStorage(array<string|int, mixed> $fileIdentifierArray) : mixed
Parameters
- $fileIdentifierArray : array<string|int, mixed>
detectMissingFiles()
Since by now all files in filesystem have been looked at it is save to assume, that files that are in indexed but not touched in this run are missing
protected
detectMissingFiles() : mixed
extractRequiredMetaData()
Since the core desperately needs image sizes in metadata table put them there This should be called after every "content" update and "record" creation
protected
extractRequiredMetaData(File $fileObject) : array<string|int, mixed>
Parameters
- $fileObject : File
Return values
array<string|int, mixed>gatherFileInformationArray()
Collects the information to be cached in sys_file
protected
gatherFileInformationArray(string $identifier) : array<string|int, mixed>
Parameters
- $identifier : string
Tags
Return values
array<string|int, mixed>getExtractorService()
protected
getExtractorService() : ExtractorService
Return values
ExtractorServicegetFileIndexRepository()
Returns an instance of the FileIndexRepository
protected
getFileIndexRepository() : FileIndexRepository
Return values
FileIndexRepositorygetFileType()
Maps the mimetype to a sys_file table type
protected
getFileType(string $mimeType) : string
Parameters
- $mimeType : string
Return values
stringgetMetaDataRepository()
Returns an instance of the FileIndexRepository
protected
getMetaDataRepository() : MetaDataRepository
Return values
MetaDataRepositorygetResourceFactory()
Returns the ResourceFactory
protected
getResourceFactory() : ResourceFactory
Return values
ResourceFactoryisFileTypeSupportedByExtractor()
Check whether the extractor service supports this file according to file type restrictions.
protected
isFileTypeSupportedByExtractor(File $file, ExtractorInterface $extractor) : bool
Parameters
- $file : File
- $extractor : ExtractorInterface
Return values
boolprocessChangedAndNewFiles()
Processes the Files which have been detected as "changed or new" in the storage
protected
processChangedAndNewFiles() : mixed
transformFromDriverFileInfoArrayToFileObjectFormat()
However it happened, the properties of a file object which are persisted to the database are named different than the properties the driver returns in getFileInfo.
protected
transformFromDriverFileInfoArrayToFileObjectFormat(array<string|int, mixed> $fileInfo) : array<string|int, mixed>
Therefore a mapping must happen.
Parameters
- $fileInfo : array<string|int, mixed>