Indexer

class \TYPO3\CMS\Core\Resource\Index\Indexer

Implements
LoggerAwareInterface
Uses
LoggerAwareTrait

The FAL Indexer

Table of Contents

Interfaces

LoggerAwareInterface

Properties

$extractorService  : ExtractorService|null
$filesToUpdate  : array
$identifiedFileUids  : array<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
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
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
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

$filesToUpdate

protected array $filesToUpdate = []

$identifiedFileUids

protected array<int, int> $identifiedFileUids = []

Methods

createIndexEntry()

Create index entry

public createIndexEntry(string $identifier) : File

Parameters

$identifier : string

Tags

throws
InvalidArgumentException

Return values

File

extractMetaData()

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[, bool $preserveCreationDate = false ]) : File

With $preserveCreationDate the stored creation date is kept, as the file system changes its ctime when a file is moved or renamed without changing its content.

Parameters

$fileObject : File
$preserveCreationDate : bool = false

Return values

File

detectChangedFilesInStorage()

Adds updated files to the processing queue

protected detectChangedFilesInStorage(array $fileIdentifierArray) : void

Parameters

$fileIdentifierArray : array

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

Parameters

$fileObject : File

Return values

array

gatherFileInformationArray()

Collects the information to be cached in sys_file

protected gatherFileInformationArray(string $identifier) : array

Parameters

$identifier : string

Return values

array

getFileType()

Maps the mimetype to a sys_file table type

protected getFileType(string $mimeType) : FileType

Parameters

$mimeType : string

Return values

FileType

isFileTypeSupportedByExtractor()

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

bool

processChangedAndNewFiles()

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 $fileInfo) : array

Therefore, a mapping must happen.

Parameters

$fileInfo : array

Return values

array
On this page