TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Resource\Index\Indexer Class Reference

Public Member Functions

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

Protected Member Functions

 getExtractionServices ()
 
 detectMissingFiles ()
 
 isFileTypeSupportedByExtractor (File $file, ExtractorInterface $extractor)
 
 detectChangedFilesInStorage (array $fileIdentifierArray)
 
 processChangedAndNewFiles ()
 
 extractRequiredMetaData (File $fileObject)
 
 gatherFileInformationArray ($identifier)
 
 getFileType ($mimeType)
 
 transformFromDriverFileInfoArrayToFileObjectFormat (array $fileInfo)
 
 getFileIndexRepository ()
 
 getMetaDataRepository ()
 
 getResourceFactory ()
 
 getExtractorRegistry ()
 

Protected Attributes

 $filesToUpdate = []
 
 $identifiedFileUids = []
 
 $storage = null
 
 $extractionServices = null
 

Detailed Description

The New FAL Indexer

Definition at line 27 of file Indexer.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 52 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

Adds updated files to the processing queue

Parameters
array$fileIdentifierArray
Returns
void

Definition at line 214 of file Indexer.php.

References TYPO3\CMS\Core\Resource\Index\Indexer\getFileIndexRepository().

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

◆ 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 177 of file Indexer.php.

References TYPO3\CMS\Core\Resource\Index\Indexer\getFileIndexRepository().

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

◆ extractMetaData()

◆ extractRequiredMetaData()

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

◆ gatherFileInformationArray()

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

◆ getExtractionServices()

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

◆ getExtractorRegistry()

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

◆ getFileIndexRepository()

◆ getFileType()

◆ getMetaDataRepository()

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

◆ getResourceFactory()

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

◆ isFileTypeSupportedByExtractor()

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

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

◆ processChangesInStorages()

◆ runMetaDataExtraction()

TYPO3\CMS\Core\Resource\Index\Indexer::runMetaDataExtraction (   $maximumFileCount = -1)

◆ transformFromDriverFileInfoArrayToFileObjectFormat()

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 367 of file Indexer.php.

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

◆ updateIndexEntry()

Member Data Documentation

◆ $extractionServices

TYPO3\CMS\Core\Resource\Index\Indexer::$extractionServices = null
protected

◆ $filesToUpdate

TYPO3\CMS\Core\Resource\Index\Indexer::$filesToUpdate = []
protected

Definition at line 32 of file Indexer.php.

◆ $identifiedFileUids

TYPO3\CMS\Core\Resource\Index\Indexer::$identifiedFileUids = []
protected

Definition at line 37 of file Indexer.php.

◆ $storage

TYPO3\CMS\Core\Resource\Index\Indexer::$storage = null
protected

Definition at line 42 of file Indexer.php.

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