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

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

array $filesToUpdate = array( )
 
int[] $identifiedFileUids = array( )
 
ResourceStorage $storage
 
ExtractorInterface[] $extractionServices
 

Detailed Description

The FAL Indexer

Definition at line 32 of file Indexer.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 55 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 save to assume, that files that are in indexed but not touched in this run are missing

Definition at line 181 of file Indexer.php.

References 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

◆ gatherFileInformationArray()

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

◆ getExtractionServices()

◆ getExtractorRegistry()

ExtractorRegistry TYPO3\CMS\Core\Resource\Index\Indexer::getExtractorRegistry ( )
protected

◆ getFileIndexRepository()

◆ getFileType()

◆ getMetaDataRepository()

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

◆ 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.

Parameters
File$file
ExtractorInterface$extractor
Returns
‪bool

Definition at line 202 of file Indexer.php.

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

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

◆ 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.

Parameters
array$fileInfo
Returns
‪array

Definition at line 383 of file Indexer.php.

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

◆ updateIndexEntry()

Member Data Documentation

◆ $extractionServices

ExtractorInterface [] TYPO3\CMS\Core\Resource\Index\Indexer::$extractionServices
protected

◆ $filesToUpdate

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

Definition at line 38 of file Indexer.php.

◆ $identifiedFileUids

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

Definition at line 42 of file Indexer.php.

◆ $storage

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

Definition at line 46 of file Indexer.php.

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