44 'uid',
'pid',
'missing',
'type',
'storage',
'identifier',
'identifier_hash',
'extension',
45 'mime_type',
'name',
'sha1',
'size',
'creation_date',
'modification_date',
'folder_hash' 63 return \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance();
95 implode(
',', $this->fields),
97 'uid=' . (
int)$fileUid
99 return is_array($row) ? $row : FALSE;
112 $identifierHash = $this->
getResourceFactory()->getStorageObject($storageUid)->hashFileIdentifier($identifier);
127 implode(
',', $this->fields),
129 sprintf(
'storage=%u AND identifier_hash=%s', (
int)$storageUid, $this->
getDatabaseConnection()->fullQuoteStr($identifierHash, $this->table))
131 return is_array($row) ? $row : FALSE;
143 $storageUid = $fileObject->getStorage()->getUid();
144 $identifierHash = $fileObject->getHashedIdentifier();
156 if (!preg_match(
'/^[0-9a-f]{40}$/i', $hash)) {
160 implode(
',', $this->fields),
175 implode(
',', $this->fields),
178 ' AND storage = ' . (
int)$folder->getStorage()->getUid(),
222 $data = array_intersect_key($data, array_flip($this->fields));
223 $data[
'tstamp'] = time();
226 $this->updateRefIndex($data[
'uid']);
248 $updateRow = array();
249 foreach ($updatedProperties as $key) {
252 if (count($updateRow) > 0) {
253 $updateRow[
'tstamp'] = time();
255 $this->updateRefIndex($file->
getUid());
269 implode(
',', $this->fields),
271 'tstamp > last_indexed AND storage = ' . (
int)$storage->getUid(),
274 (int)$limit > 0 ? (
int)$limit :
'' 287 $where =
'storage = ' . (int)$storage->getUid();
288 if (!empty($uidList)) {
289 $where .=
' AND uid NOT IN (' . implode(
',', $this->
getDatabaseConnection()->cleanIntArray($uidList)) .
')';
291 return $this->
getDatabaseConnection()->exec_SELECTgetRows(implode(
',', $this->fields), $this->table, $where);
301 $this->
getDatabaseConnection()->exec_UPDATEquery($this->table,
'uid = ' . (
int)$fileUid, array(
'last_indexed' => time()));
311 $this->
getDatabaseConnection()->exec_UPDATEquery($this->table,
'uid = ' . (
int)$fileUid, array(
'missing' => 1));
323 $where =
'uid=' . (int)$file->
getUid();
326 'storage=%u AND identifier LIKE %s',
340 public function remove($fileUid) {
342 $this->updateRefIndex($fileUid);
353 public function updateRefIndex($id) {
356 $refIndexObj->updateRefIndexTable($this->table, $id);
366 return $this->
getObjectManager()->get(
'TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
375 return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
387 $this->
getSignalSlotDispatcher()->dispatch(
'TYPO3\\CMS\\Core\\Resource\\Index\\FileIndexRepository',
'recordUpdated', array($data));
397 $this->
getSignalSlotDispatcher()->dispatch(
'TYPO3\\CMS\\Core\\Resource\\Index\\FileIndexRepository',
'recordCreated', array($data));
407 $this->
getSignalSlotDispatcher()->dispatch(
'TYPO3\\CMS\\Core\\Resource\\Index\\FileIndexRepository',
'recordDeleted', array($fileUid));
findOneByFileObject(\TYPO3\CMS\Core\Resource\FileInterface $fileObject)
hasIndexRecord(File $file)
findByFolder(\TYPO3\CMS\Core\Resource\Folder $folder)
findOneByStorageUidAndIdentifier($storageUid, $identifier)
emitRecordDeletedSignal($fileUid)
updateProperties(array $properties)
static makeInstance($className)
emitRecordCreatedSignal(array $data)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
findInStorageAndNotInUidList(\TYPO3\CMS\Core\Resource\ResourceStorage $storage, array $uidList)
getSignalSlotDispatcher()
emitRecordUpdatedSignal(array $data)
updateIndexingTime($fileUid)
findOneByCombinedIdentifier($combinedIdentifier)
findInStorageWithIndexOutstanding(\TYPO3\CMS\Core\Resource\ResourceStorage $storage, $limit=-1)
markFileAsMissing($fileUid)
getWhereClauseForFile(File $file)
findOneByStorageUidAndIdentifierHash($storageUid, $identifierHash)
insertRecord(array $data)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]