TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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 ()
 
 detectChangedFilesInStorage (array $fileIdentifierArray)
 
 processChangedAndNewFiles ()
 
 extractRequiredMetaData (File $fileObject)
 
 gatherFileInformationArray ($identifier)
 
 getFileType ($mimeType)
 
 transformFromDriverFileInfoArrayToFileObjectFormat (array $fileInfo)
 
 getFileIndexRepository ()
 
 getMetaDataRepository ()
 
 getResourceFactory ()
 
 getExtractorRegistry ()
 

Protected Attributes

 $filesToUpdate = array()
 
 $identifiedFileUids = array()
 
 $storage = null
 
 $extractionServices = null
 

Detailed Description

The New FAL Indexer

Definition at line 25 of file core/Classes/Resource/Index/Indexer.php.

Constructor & Destructor Documentation

__construct ( ResourceStorage  $storage)
Parameters
ResourceStorage$storage

Definition at line 50 of file core/Classes/Resource/Index/Indexer.php.

References Indexer\$storage.

Member Function Documentation

createIndexEntry (   $identifier)

Create index entry

Parameters
string$identifier
Returns
File
Exceptions
\InvalidArgumentException

Definition at line 62 of file core/Classes/Resource/Index/Indexer.php.

References Indexer\extractRequiredMetaData(), Indexer\gatherFileInformationArray(), Indexer\getFileIndexRepository(), and Indexer\getResourceFactory().

Referenced by Indexer\processChangedAndNewFiles().

detectChangedFilesInStorage ( array  $fileIdentifierArray)
protected

Adds updated files to the processing queue

Parameters
array$fileIdentifierArray
Returns
void

Definition at line 176 of file core/Classes/Resource/Index/Indexer.php.

References Indexer\getFileIndexRepository().

Referenced by Indexer\processChangesInStorages().

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 156 of file core/Classes/Resource/Index/Indexer.php.

References Indexer\getFileIndexRepository().

Referenced by Indexer\processChangesInStorages().

extractMetaData ( File  $fileObject)
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

Parameters
File$fileObject

Definition at line 247 of file core/Classes/Resource/Index/Indexer.php.

References File\_updateMetaDataProperties(), AbstractFile\FILETYPE_IMAGE, AbstractFile\getForLocalProcessing(), Indexer\getMetaDataRepository(), AbstractFile\getType(), AbstractFile\getUid(), and GeneralUtility\makeInstance().

Referenced by Indexer\createIndexEntry(), and Indexer\updateIndexEntry().

gatherFileInformationArray (   $identifier)
protected

Collects the information to be cached in sys_file

Parameters
string$identifier
Returns
array

Definition at line 275 of file core/Classes/Resource/Index/Indexer.php.

References Indexer\getFileType(), and Indexer\transformFromDriverFileInfoArrayToFileObjectFormat().

Referenced by Indexer\createIndexEntry(), and Indexer\updateIndexEntry().

getExtractionServices ( )
protected

Get available extraction services

Returns
ExtractorInterface[]

Definition at line 144 of file core/Classes/Resource/Index/Indexer.php.

References Indexer\$extractionServices, and Indexer\getExtractorRegistry().

Referenced by Indexer\extractMetaData().

getExtractorRegistry ( )
protected

Returns an instance of the FileIndexRepository

Returns
ExtractorRegistry

Definition at line 388 of file core/Classes/Resource/Index/Indexer.php.

References ExtractorRegistry\getInstance().

Referenced by Indexer\getExtractionServices().

getFileIndexRepository ( )
protected
getFileType (   $mimeType)
protected
getMetaDataRepository ( )
protected
getResourceFactory ( )
protected
processChangedAndNewFiles ( )
protected

Processes the Files which have been detected as "changed or new" in the storage

Returns
void

Definition at line 206 of file core/Classes/Resource/Index/Indexer.php.

References Indexer\createIndexEntry(), Indexer\getFileIndexRepository(), Indexer\getResourceFactory(), and Indexer\updateIndexEntry().

Referenced by Indexer\processChangesInStorages().

processChangesInStorages ( )
runMetaDataExtraction (   $maximumFileCount = -1)
Parameters
int$maximumFileCount
Returns
void

Definition at line 105 of file core/Classes/Resource/Index/Indexer.php.

References Indexer\extractMetaData(), Indexer\getFileIndexRepository(), and Indexer\getResourceFactory().

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 329 of file core/Classes/Resource/Index/Indexer.php.

Referenced by Indexer\gatherFileInformationArray().

updateIndexEntry ( File  $fileObject)

Member Data Documentation

$extractionServices = null
protected
$filesToUpdate = array()
protected

Definition at line 30 of file core/Classes/Resource/Index/Indexer.php.

$identifiedFileUids = array()
protected

Definition at line 35 of file core/Classes/Resource/Index/Indexer.php.

$storage = null
protected

Definition at line 40 of file core/Classes/Resource/Index/Indexer.php.

Referenced by Indexer\__construct().