Indexer implements LoggerAwareInterface uses LoggerAwareTrait
The FAL Indexer
Table of Contents
Interfaces
- LoggerAwareInterface
Properties
- $extractorService : ExtractorService|null
- $filesToUpdate : array<string|int, mixed>
- $identifiedFileUids : array<string|int, int>
- $storage : ResourceStorage
Methods
- __construct() : mixed
- createIndexEntry() : File
- Create index entry
- extractMetaData() : void
- Extract metadata for given fileObject
- processChangesInStorages() : void
- runMetaDataExtraction() : void
- updateIndexEntry() : File
- Update index entry
- detectChangedFilesInStorage() : void
- Adds updated files to the processing queue
- detectMissingFiles() : void
- Since by now all files in filesystem have been looked at, it is safe to assume, that files that are 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
- getFileType() : FileType
- Maps the mimetype to a sys_file table type
- getResourceFactory() : ResourceFactory
- isFileTypeSupportedByExtractor() : bool
- Check whether the extractor service supports this file according to file type restrictions.
- processChangedAndNewFiles() : void
- 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|null
$extractorService
= null
$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) : void
Parameters
- $fileObject : File
processChangesInStorages()
public
processChangesInStorages() : void
runMetaDataExtraction()
public
runMetaDataExtraction([int $maximumFileCount = -1 ]) : void
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) : void
Parameters
- $fileIdentifierArray : array<string|int, mixed>
detectMissingFiles()
Since by now all files in filesystem have been looked at, it is safe to assume, that files that are indexed, but not touched in this run, are missing
protected
detectMissingFiles() : void
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
Return values
array<string|int, mixed>getExtractorService()
protected
getExtractorService() : ExtractorService
Return values
ExtractorServicegetFileIndexRepository()
protected
getFileIndexRepository() : FileIndexRepository
Return values
FileIndexRepositorygetFileType()
Maps the mimetype to a sys_file table type
protected
getFileType(string $mimeType) : FileType
Parameters
- $mimeType : string
Return values
FileTypegetResourceFactory()
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() : void
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>