TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ProcessedFileRepository Class Reference
Inheritance diagram for ProcessedFileRepository:
AbstractRepository RepositoryInterface SingletonInterface

Public Member Functions

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

Protected Member Functions

 createDomainObject (array $databaseRow)
 
 cleanUnavailableColumns (array $data)
 
 getLogger ()
 
- Protected Member Functions inherited from AbstractRepository
 createDomainObject (array $databaseRow)
 
 getEnvironmentMode ()
 

Protected Attributes

 $objectType = ProcessedFile::class
 
 $table = 'sys_file_processedfile'
 
- Protected Attributes inherited from AbstractRepository
 $table = ''
 
 $factory
 
 $typeField = ''
 
 $type = ''
 
 $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 25 of file ProcessedFileRepository.php.

Constructor & Destructor Documentation

__construct ( )

Creates this object.

Definition at line 47 of file ProcessedFileRepository.php.

Member Function Documentation

add (   $processedFile)

Adds a processedfile object in the database

Parameters
ProcessedFile$processedFile
Returns
void

Implements RepositoryInterface.

Definition at line 129 of file ProcessedFileRepository.php.

References ProcessedFileRepository\cleanUnavailableColumns(), GeneralUtility\makeInstance(), and ProcessedFileRepository\update().

cleanUnavailableColumns ( array  $data)
protected

Removes all array keys which cannot be persisted

Parameters
array$data
Returns
array

Definition at line 294 of file ProcessedFileRepository.php.

References GeneralUtility\makeInstance().

Referenced by ProcessedFileRepository\add(), and ProcessedFileRepository\update().

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 60 of file ProcessedFileRepository.php.

References GeneralUtility\makeInstance().

Referenced by ProcessedFileRepository\findOneByOriginalFileAndTaskTypeAndConfiguration().

findAllByOriginalFile ( FileInterface  $file)
Parameters
FileInterface$file
Returns
ProcessedFile[]
Exceptions
InvalidArgumentException

Definition at line 215 of file ProcessedFileRepository.php.

References ProcessedFileRepository\createDomainObject(), and GeneralUtility\makeInstance().

findByStorageAndIdentifier ( ResourceStorage  $storage,
  $identifier 
)
Parameters
ResourceStorage$storage
string$identifier
Returns
null|ProcessedFile

Definition at line 96 of file ProcessedFileRepository.php.

References ProcessedFileRepository\createDomainObject(), ResourceStorage\getUid(), ResourceStorage\hasFile(), and GeneralUtility\makeInstance().

findOneByOriginalFileAndTaskTypeAndConfiguration ( FileInterface  $file,
  $taskType,
array  $configuration 
)
Parameters
\TYPO3\CMS\Core\Resource\File | \TYPO3\CMS\Core\Resource\FileInterface$file
string$taskTypeThe task that should be executed on the file
array$configuration
Returns
ProcessedFile

Definition at line 181 of file ProcessedFileRepository.php.

References ProcessedFileRepository\createDomainObject(), ProcessedFileRepository\createNewProcessedFileObject(), and GeneralUtility\makeInstance().

getLogger ( )
protected
Returns

Definition at line 306 of file ProcessedFileRepository.php.

References GeneralUtility\makeInstance().

Referenced by ProcessedFileRepository\removeAll().

removeAll (   $storageUid = null)

Removes all processed files and also deletes the associated physical files

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

Definition at line 247 of file ProcessedFileRepository.php.

References ProcessedFileRepository\createDomainObject(), ProcessedFileRepository\getLogger(), and GeneralUtility\makeInstance().

update (   $processedFile)

Updates an existing file object in the database

Parameters
ProcessedFile$processedFile
Returns
void

Implements RepositoryInterface.

Definition at line 156 of file ProcessedFileRepository.php.

References ProcessedFileRepository\cleanUnavailableColumns(), and GeneralUtility\makeInstance().

Referenced by ProcessedFileRepository\add().

Member Data Documentation

$objectType = ProcessedFile::class
protected

Definition at line 34 of file ProcessedFileRepository.php.

$table = 'sys_file_processedfile'
protected

Definition at line 42 of file ProcessedFileRepository.php.