Indexer

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

Implements
LoggerAwareInterface
Uses
LoggerAwareTrait

The FAL Indexer

Table of Contents

Interfaces

LoggerAwareInterface

Properties

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

File

detectChangedFilesInStorage()

Adds updated files to the processing queue

protected detectChangedFilesInStorage(array $fileIdentifierArray) : mixed

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() : 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

Parameters

$fileObject : File

Return values

array

gatherFileInformationArray()

Collects the information to be cached in sys_file

protected gatherFileInformationArray(string $identifier) : array

Parameters

$identifier : string

Tags

throws
InvalidHashException

Return values

array

getFileType()

Maps the mimetype to a sys_file table type

protected getFileType(string $mimeType) : string

Parameters

$mimeType : string

Return values

string

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

Therefore a mapping must happen.

Parameters

$fileInfo : array

Return values

array
On this page