‪TYPO3CMS  10.4
TYPO3\CMS\Core\Resource\ProcessedFileRepository Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\ProcessedFileRepository:
TYPO3\CMS\Core\Resource\AbstractRepository TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct ()
 
ProcessedFile createNewProcessedFileObject (FileInterface $originalFile, $taskType, array $configuration)
 
ProcessedFile null findByStorageAndIdentifier (ResourceStorage $storage, $identifier)
 
int countByStorage (ResourceStorage $storage)
 
 add ($processedFile)
 
 update ($processedFile)
 
ProcessedFile findOneByOriginalFileAndTaskTypeAndConfiguration (File $file, $taskType, array $configuration)
 
ProcessedFile[] findAllByOriginalFile (FileInterface $file)
 
int removeAll ($storageUid=null)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Resource\AbstractRepository
 remove ($object)
 
 replace ($existingObject, $newObject)
 
array getAddedObjects ()
 
array getRemovedObjects ()
 
array findAll ()
 
int countAll ()
 
 removeAll ()
 
object findByUid ($uid)
 
 setDefaultOrderings (array $defaultOrderings)
 
 setDefaultQuerySettings (QuerySettingsInterface $defaultQuerySettings)
 
TYPO3 CMS Extbase Persistence QueryInterface createQuery ()
 
object null findByIdentifier ($identifier)
 
 __call ($method, $arguments)
 
string getEntityClassName ()
 

Protected Member Functions

ProcessedFile createDomainObject (array $databaseRow)
 
array cleanUnavailableColumns (array $data)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Resource\AbstractRepository
string getEnvironmentMode ()
 

Protected Attributes

string $objectType = ProcessedFile::class
 
string $table = 'sys_file_processedfile'
 
array $tableColumns = array( )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Resource\AbstractRepository
string $table = ''
 
ResourceFactory $factory
 
string $typeField = ''
 
string $type = ''
 
string $objectType
 

Detailed Description

Repository for accessing files it also serves as the public API for the indexing part of files in general

Definition at line 29 of file ProcessedFileRepository.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Resource\ProcessedFileRepository::__construct ( )

Creates this object.

Reimplemented from TYPO3\CMS\Core\Resource\AbstractRepository.

Definition at line 58 of file ProcessedFileRepository.php.

Member Function Documentation

◆ add()

TYPO3\CMS\Core\Resource\ProcessedFileRepository::add (   $processedFile)

◆ cleanUnavailableColumns()

array TYPO3\CMS\Core\Resource\ProcessedFileRepository::cleanUnavailableColumns ( array  $data)
protected

Removes all array keys which cannot be persisted

Parameters
array$data
Returns
‪array

Definition at line 355 of file ProcessedFileRepository.php.

References TYPO3\CMS\Core\Resource\ProcessedFileRepository\$table.

Referenced by TYPO3\CMS\Core\Resource\ProcessedFileRepository\add(), and TYPO3\CMS\Core\Resource\ProcessedFileRepository\update().

◆ countByStorage()

int TYPO3\CMS\Core\Resource\ProcessedFileRepository::countByStorage ( ResourceStorage  $storage)

Count processed files by storage. This is used in the install tool to render statistics of processed files.

Parameters
ResourceStorage$storage
Returns
‪int

Definition at line 151 of file ProcessedFileRepository.php.

References TYPO3\CMS\Core\Resource\ResourceStorage\getUid().

◆ createDomainObject()

◆ createNewProcessedFileObject()

ProcessedFile TYPO3\CMS\Core\Resource\ProcessedFileRepository::createNewProcessedFileObject ( FileInterface  $originalFile,
  $taskType,
array  $configuration 
)

Creates a ProcessedFile object from a file object and a processing configuration

Parameters
FileInterface$originalFile
string$taskType
array$configuration
Returns
ProcessedFile

Definition at line 71 of file ProcessedFileRepository.php.

Referenced by TYPO3\CMS\Core\Resource\ProcessedFileRepository\findOneByOriginalFileAndTaskTypeAndConfiguration().

◆ findAllByOriginalFile()

ProcessedFile [] TYPO3\CMS\Core\Resource\ProcessedFileRepository::findAllByOriginalFile ( FileInterface  $file)
Parameters
FileInterface$file
Returns
ProcessedFile[]
Exceptions

Definition at line 260 of file ProcessedFileRepository.php.

References TYPO3\CMS\Core\Resource\ProcessedFileRepository\createDomainObject().

◆ findByStorageAndIdentifier()

ProcessedFile null TYPO3\CMS\Core\Resource\ProcessedFileRepository::findByStorageAndIdentifier ( ResourceStorage  $storage,
  $identifier 
)

◆ findOneByOriginalFileAndTaskTypeAndConfiguration()

ProcessedFile TYPO3\CMS\Core\Resource\ProcessedFileRepository::findOneByOriginalFileAndTaskTypeAndConfiguration ( File  $file,
  $taskType,
array  $configuration 
)
Parameters
\TYPO3\CMS\Core\Resource\File$file
string$taskType‪The task that should be executed on the file
array$configuration
Returns
ProcessedFile

Definition at line 226 of file ProcessedFileRepository.php.

References TYPO3\CMS\Core\Resource\ProcessedFileRepository\createDomainObject(), TYPO3\CMS\Core\Resource\ProcessedFileRepository\createNewProcessedFileObject(), and TYPO3\CMS\Core\Resource\AbstractFile\getUid().

◆ removeAll()

int TYPO3\CMS\Core\Resource\ProcessedFileRepository::removeAll (   $storageUid = null)

Removes all processed files and also deletes the associated physical files. If a storageUid is given, only db entries and files of this storage are removed.

Parameters
int | null$storageUid‪If not NULL, only the processed files of the given storage are removed
Returns
‪int Number of failed deletions

Definition at line 293 of file ProcessedFileRepository.php.

References TYPO3\CMS\Core\Resource\ProcessedFileRepository\createDomainObject().

◆ update()

TYPO3\CMS\Core\Resource\ProcessedFileRepository::update (   $processedFile)

Member Data Documentation

◆ $objectType

string TYPO3\CMS\Core\Resource\ProcessedFileRepository::$objectType = ProcessedFile::class
protected

The main object type of this class. In some cases (fileReference) this repository can also return FileReference objects, implementing the common FileInterface.

Definition at line 39 of file ProcessedFileRepository.php.

◆ $table

string TYPO3\CMS\Core\Resource\ProcessedFileRepository::$table = 'sys_file_processedfile'
protected

Main File object storage table. Note that this repository also works on the sys_file_reference table when returning FileReference objects.

Definition at line 46 of file ProcessedFileRepository.php.

Referenced by TYPO3\CMS\Core\Resource\ProcessedFileRepository\cleanUnavailableColumns().

◆ $tableColumns

array TYPO3\CMS\Core\Resource\ProcessedFileRepository::$tableColumns = array( )
protected

As determining the table columns is a costly operation this is done only once during runtime and cached then

See also
cleanUnavailableColumns()

Definition at line 53 of file ProcessedFileRepository.php.