‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Index\Indexer Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\Index\Indexer:

Public Member Functions

 __construct (ResourceStorage $storage)
 
 createIndexEntry ($identifier)
 
 updateIndexEntry (File $fileObject)
 
 processChangesInStorages ()
 
 runMetaDataExtraction ($maximumFileCount=-1)
 
 extractMetaData (File $fileObject)
 

Protected Member Functions

 detectMissingFiles ()
 
bool isFileTypeSupportedByExtractor (File $file, ExtractorInterface $extractor)
 
 detectChangedFilesInStorage (array $fileIdentifierArray)
 
 processChangedAndNewFiles ()
 
 extractRequiredMetaData (File $fileObject)
 
 gatherFileInformationArray ($identifier)
 
 getFileType (string $mimeType)
 
array transformFromDriverFileInfoArrayToFileObjectFormat (array $fileInfo)
 
FileIndexRepository getFileIndexRepository ()
 
MetaDataRepository getMetaDataRepository ()
 
ResourceFactory getResourceFactory ()
 
 getExtractorService ()
 

Protected Attributes

array $filesToUpdate = array( )
 
int[] $identifiedFileUids = array( )
 
ResourceStorage $storage
 
ExtractorService $extractorService
 

Detailed Description

The FAL Indexer

Definition at line 34 of file Indexer.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Resource\Index\Indexer::__construct ( ResourceStorage  $storage)

Definition at line 54 of file Indexer.php.

References TYPO3\CMS\Core\Resource\Index\Indexer\$storage.

Member Function Documentation

◆ createIndexEntry()

◆ detectChangedFilesInStorage()

TYPO3\CMS\Core\Resource\Index\Indexer::detectChangedFilesInStorage ( array  $fileIdentifierArray)
protected

◆ detectMissingFiles()

TYPO3\CMS\Core\Resource\Index\Indexer::detectMissingFiles ( )
protected

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

Definition at line 163 of file Indexer.php.

References TYPO3\CMS\Webhooks\Message\$record, TYPO3\CMS\Core\Resource\Index\FileIndexRepository\findInStorageAndNotInUidList(), TYPO3\CMS\Core\Resource\Index\Indexer\getFileIndexRepository(), and TYPO3\CMS\Core\Resource\Index\FileIndexRepository\markFileAsMissing().

Referenced by TYPO3\CMS\Core\Resource\Index\Indexer\processChangesInStorages().

◆ extractMetaData()

◆ extractRequiredMetaData()

TYPO3\CMS\Core\Resource\Index\Indexer::extractRequiredMetaData ( File  $fileObject)
protected

Since the core desperately needs image sizes in metadata table put them there This should be called after every "content" update and "record" creation

Definition at line 284 of file Indexer.php.

References TYPO3\CMS\Core\Resource\AbstractFile\getForLocalProcessing(), and TYPO3\CMS\Core\Resource\AbstractFile\isImage().

Referenced by TYPO3\CMS\Core\Resource\Index\Indexer\createIndexEntry(), and TYPO3\CMS\Core\Resource\Index\Indexer\updateIndexEntry().

◆ gatherFileInformationArray()

TYPO3\CMS\Core\Resource\Index\Indexer::gatherFileInformationArray (   $identifier)
protected

◆ getExtractorService()

TYPO3\CMS\Core\Resource\Index\Indexer::getExtractorService ( )
protected

◆ getFileIndexRepository()

◆ getFileType()

TYPO3\CMS\Core\Resource\Index\Indexer::getFileType ( string  $mimeType)
protected

Maps the mimetype to a sys_file table type

Definition at line 325 of file Indexer.php.

References TYPO3\CMS\Core\Resource\tryFromMimeType.

Referenced by TYPO3\CMS\Core\Resource\Index\Indexer\gatherFileInformationArray().

◆ getMetaDataRepository()

MetaDataRepository TYPO3\CMS\Core\Resource\Index\Indexer::getMetaDataRepository ( )
protected

Returns an instance of the FileIndexRepository

Returns
MetaDataRepository

Definition at line 376 of file Indexer.php.

◆ getResourceFactory()

◆ isFileTypeSupportedByExtractor()

bool TYPO3\CMS\Core\Resource\Index\Indexer::isFileTypeSupportedByExtractor ( File  $file,
ExtractorInterface  $extractor 
)
protected

Check whether the extractor service supports this file according to file type restrictions.

Returns
‪bool

Definition at line 190 of file Indexer.php.

References TYPO3\CMS\Core\Resource\Index\ExtractorInterface\getFileTypeRestrictions(), and TYPO3\CMS\Core\Resource\AbstractFile\getType().

◆ processChangedAndNewFiles()

◆ processChangesInStorages()

◆ runMetaDataExtraction()

◆ transformFromDriverFileInfoArrayToFileObjectFormat()

array TYPO3\CMS\Core\Resource\Index\Indexer::transformFromDriverFileInfoArrayToFileObjectFormat ( array  $fileInfo)
protected

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. Therefore a mapping must happen.

Returns
‪array

Definition at line 338 of file Indexer.php.

Referenced by TYPO3\CMS\Core\Resource\Index\Indexer\gatherFileInformationArray().

◆ updateIndexEntry()

Member Data Documentation

◆ $extractorService

ExtractorService TYPO3\CMS\Core\Resource\Index\Indexer::$extractorService
protected

◆ $filesToUpdate

array TYPO3\CMS\Core\Resource\Index\Indexer::$filesToUpdate = array( )
protected

Definition at line 40 of file Indexer.php.

◆ $identifiedFileUids

int [] TYPO3\CMS\Core\Resource\Index\Indexer::$identifiedFileUids = array( )
protected

Definition at line 44 of file Indexer.php.

◆ $storage

ResourceStorage TYPO3\CMS\Core\Resource\Index\Indexer::$storage
protected

Definition at line 48 of file Indexer.php.

Referenced by TYPO3\CMS\Core\Resource\Index\Indexer\__construct().