TYPO3
7.6
|
Public Member Functions | |
findOneByCombinedIdentifier ($combinedIdentifier) | |
findOneByUid ($fileUid) | |
findOneByStorageUidAndIdentifier ($storageUid, $identifier) | |
findOneByStorageUidAndIdentifierHash ($storageUid, $identifierHash) | |
findOneByFileObject (\TYPO3\CMS\Core\Resource\FileInterface $fileObject) | |
findByContentHash ($hash) | |
findByFolder (\TYPO3\CMS\Core\Resource\Folder $folder) | |
findByFolders (array $folders, $includeMissing=true) | |
add (File $file) | |
addRaw (array $data) | |
hasIndexRecord (File $file) | |
update (File $file) | |
findInStorageWithIndexOutstanding (\TYPO3\CMS\Core\Resource\ResourceStorage $storage, $limit=-1) | |
findInStorageAndNotInUidList (\TYPO3\CMS\Core\Resource\ResourceStorage $storage, array $uidList) | |
updateIndexingTime ($fileUid) | |
markFileAsMissing ($fileUid) | |
remove ($fileUid) | |
Static Public Member Functions | |
static | getInstance () |
Protected Member Functions | |
getDatabaseConnection () | |
getResourceFactory () | |
insertRecord (array $data) | |
getWhereClauseForFile (File $file) | |
getSignalSlotDispatcher () | |
getObjectManager () | |
emitRecordUpdatedSignal (array $data) | |
emitRecordCreatedSignal (array $data) | |
emitRecordDeletedSignal ($fileUid) | |
emitRecordMarkedAsMissingSignal ($fileUid) | |
Protected Attributes | |
$table = 'sys_file' | |
$fields | |
Repository Class as an abstraction layer to sys_file
Every access to table sys_file_metadata which is not handled by TCEmain has to use this Repository class.
This is meant for FAL internal use only!.
Definition at line 30 of file FileIndexRepository.php.
add | ( | File | $file | ) |
Adds a file to the index
File | $file |
Definition at line 240 of file FileIndexRepository.php.
References File\_getPropertyRaw(), FileIndexRepository\findOneByFileObject(), File\getProperties(), FileIndexRepository\hasIndexRecord(), FileIndexRepository\insertRecord(), FileIndexRepository\update(), and File\updateProperties().
addRaw | ( | array | $data | ) |
Add data from record (at indexing time)
array | $data |
Definition at line 258 of file FileIndexRepository.php.
References FileIndexRepository\insertRecord().
|
protected |
Signal that is called after an IndexRecord is created
array | $data |
Definition at line 460 of file FileIndexRepository.php.
References FileIndexRepository\getSignalSlotDispatcher().
Referenced by FileIndexRepository\insertRecord().
|
protected |
Signal that is called after an IndexRecord is deleted
int | $fileUid |
Definition at line 471 of file FileIndexRepository.php.
References FileIndexRepository\getSignalSlotDispatcher().
Referenced by FileIndexRepository\remove().
|
protected |
Signal that is called after an IndexRecord is marked as missing
int | $fileUid |
Definition at line 482 of file FileIndexRepository.php.
References FileIndexRepository\getSignalSlotDispatcher().
Referenced by FileIndexRepository\markFileAsMissing().
|
protected |
Signal that is called after an IndexRecord is updated
array | $data |
Definition at line 449 of file FileIndexRepository.php.
References FileIndexRepository\getSignalSlotDispatcher().
Referenced by FileIndexRepository\update().
findByContentHash | ( | $hash | ) |
Returns all indexed files which match the content hash Used by the indexer to detect already present files
string | $hash |
Definition at line 162 of file FileIndexRepository.php.
References FileIndexRepository\getDatabaseConnection().
findByFolder | ( | \TYPO3\CMS\Core\Resource\Folder | $folder | ) |
Find all records for files in a Folder
\TYPO3\CMS\Core\Resource\Folder | $folder |
Definition at line 181 of file FileIndexRepository.php.
References FileIndexRepository\$table, and FileIndexRepository\getDatabaseConnection().
findByFolders | ( | array | $folders, |
$includeMissing = true |
|||
) |
Find all records for files in an array of Folders
\TYPO3\CMS\Core\Resource\Folder[] | $folders | |
bool | $includeMissing |
Definition at line 203 of file FileIndexRepository.php.
References FileIndexRepository\getDatabaseConnection().
findInStorageAndNotInUidList | ( | \TYPO3\CMS\Core\Resource\ResourceStorage | $storage, |
array | $uidList | ||
) |
Helper function for the Indexer to detect missing files
\TYPO3\CMS\Core\Resource\ResourceStorage | $storage | |
array | $uidList |
Definition at line 340 of file FileIndexRepository.php.
References FileIndexRepository\getDatabaseConnection().
findInStorageWithIndexOutstanding | ( | \TYPO3\CMS\Core\Resource\ResourceStorage | $storage, |
$limit = -1 |
|||
) |
Finds the files needed for second indexer step
\TYPO3\CMS\Core\Resource\ResourceStorage | $storage | |
int | $limit |
Definition at line 320 of file FileIndexRepository.php.
References FileIndexRepository\getDatabaseConnection().
findOneByCombinedIdentifier | ( | $combinedIdentifier | ) |
Retrieves Index record for a given $combinedIdentifier
string | $combinedIdentifier |
Definition at line 84 of file FileIndexRepository.php.
References FileIndexRepository\findOneByStorageUidAndIdentifier(), and GeneralUtility\trimExplode().
findOneByFileObject | ( | \TYPO3\CMS\Core\Resource\FileInterface | $fileObject | ) |
Retrieves Index record for a given $fileObject
\TYPO3\CMS\Core\Resource\FileInterface | $fileObject |
Definition at line 148 of file FileIndexRepository.php.
References FileIndexRepository\findOneByStorageUidAndIdentifierHash().
Referenced by FileIndexRepository\add().
findOneByStorageUidAndIdentifier | ( | $storageUid, | |
$identifier | |||
) |
Retrieves Index record for a given $storageUid and $identifier
int | $storageUid | |
string | $identifier |
Definition at line 115 of file FileIndexRepository.php.
References FileIndexRepository\findOneByStorageUidAndIdentifierHash(), and FileIndexRepository\getResourceFactory().
Referenced by FileIndexRepository\findOneByCombinedIdentifier().
findOneByStorageUidAndIdentifierHash | ( | $storageUid, | |
$identifierHash | |||
) |
Retrieves Index record for a given $storageUid and $identifier
int | $storageUid | |
string | $identifierHash |
Definition at line 130 of file FileIndexRepository.php.
References FileIndexRepository\getDatabaseConnection().
Referenced by FileIndexRepository\findOneByFileObject(), and FileIndexRepository\findOneByStorageUidAndIdentifier().
findOneByUid | ( | $fileUid | ) |
Retrieves Index record for a given $fileUid
int | $fileUid |
Definition at line 96 of file FileIndexRepository.php.
References FileIndexRepository\getDatabaseConnection().
|
protected |
Gets database instance
Definition at line 52 of file FileIndexRepository.php.
References $GLOBALS.
Referenced by FileIndexRepository\findByContentHash(), FileIndexRepository\findByFolder(), FileIndexRepository\findByFolders(), FileIndexRepository\findInStorageAndNotInUidList(), FileIndexRepository\findInStorageWithIndexOutstanding(), FileIndexRepository\findOneByStorageUidAndIdentifierHash(), FileIndexRepository\findOneByUid(), FileIndexRepository\getWhereClauseForFile(), FileIndexRepository\hasIndexRecord(), FileIndexRepository\insertRecord(), FileIndexRepository\markFileAsMissing(), FileIndexRepository\remove(), FileIndexRepository\update(), and FileIndexRepository\updateIndexingTime().
|
static |
Returns an Instance of the Repository
Definition at line 73 of file FileIndexRepository.php.
References GeneralUtility\makeInstance().
Referenced by AbstractOnlineMediaHelper\getFileIndexRepository(), FileRepository\getFileIndexRepository(), Indexer\getFileIndexRepository(), ResourceFactory\getFileIndexRepository(), and ResourceStorage\getFileIndexRepository().
|
protected |
Get the ObjectManager
Definition at line 436 of file FileIndexRepository.php.
Referenced by FileIndexRepository\getSignalSlotDispatcher().
|
protected |
Gets the Resource Factory
Definition at line 62 of file FileIndexRepository.php.
Referenced by FileIndexRepository\findOneByStorageUidAndIdentifier().
|
protected |
Definition at line 426 of file FileIndexRepository.php.
References FileIndexRepository\getObjectManager().
Referenced by FileIndexRepository\emitRecordCreatedSignal(), FileIndexRepository\emitRecordDeletedSignal(), FileIndexRepository\emitRecordMarkedAsMissingSignal(), and FileIndexRepository\emitRecordUpdatedSignal().
|
protected |
Returns a where clause to find a file in database
File | $file |
Definition at line 379 of file FileIndexRepository.php.
References FileIndexRepository\$table, File\_getPropertyRaw(), FileIndexRepository\getDatabaseConnection(), AbstractFile\getStorage(), and AbstractFile\getUid().
Referenced by FileIndexRepository\hasIndexRecord(), and FileIndexRepository\update().
hasIndexRecord | ( | File | $file | ) |
Checks if a file is indexed
File | $file |
Definition at line 287 of file FileIndexRepository.php.
References FileIndexRepository\getDatabaseConnection(), and FileIndexRepository\getWhereClauseForFile().
Referenced by FileIndexRepository\add().
|
protected |
Helper to reduce code duplication
array | $data |
Definition at line 271 of file FileIndexRepository.php.
References FileIndexRepository\emitRecordCreatedSignal(), and FileIndexRepository\getDatabaseConnection().
Referenced by FileIndexRepository\add(), and FileIndexRepository\addRaw().
markFileAsMissing | ( | $fileUid | ) |
Marks given file as missing in sys_file
int | $fileUid |
Definition at line 366 of file FileIndexRepository.php.
References FileIndexRepository\emitRecordMarkedAsMissingSignal(), and FileIndexRepository\getDatabaseConnection().
remove | ( | $fileUid | ) |
Remove a sys_file record from the database
int | $fileUid |
Definition at line 399 of file FileIndexRepository.php.
References FileIndexRepository\emitRecordDeletedSignal(), and FileIndexRepository\getDatabaseConnection().
update | ( | File | $file | ) |
Updates the index record in the database
File | $file |
Definition at line 298 of file FileIndexRepository.php.
References FileIndexRepository\emitRecordUpdatedSignal(), FileIndexRepository\getDatabaseConnection(), File\getProperties(), File\getProperty(), AbstractFile\getUid(), File\getUpdatedProperties(), and FileIndexRepository\getWhereClauseForFile().
Referenced by FileIndexRepository\add().
updateIndexingTime | ( | $fileUid | ) |
Updates the timestamp when the file indexer extracted metadata
int | $fileUid |
Definition at line 355 of file FileIndexRepository.php.
References FileIndexRepository\getDatabaseConnection().
|
protected |
Definition at line 42 of file FileIndexRepository.php.
|
protected |
Definition at line 35 of file FileIndexRepository.php.
Referenced by FileIndexRepository\findByFolder(), and FileIndexRepository\getWhereClauseForFile().