‪TYPO3CMS  10.4
TYPO3\CMS\Core\Resource\Service\FileProcessingService Class Reference

Public Member Functions

 __construct (ResourceStorage $storage, DriverInterface $driver, EventDispatcherInterface $eventDispatcher=null)
 
Resource ProcessedFile processFile (FileInterface $fileObject, ResourceStorage $targetStorage, $taskType, $configuration)
 

Public Attributes

const SIGNAL_PreFileProcess = 'preFileProcess'
 
const SIGNAL_PostFileProcess = 'postFileProcess'
 

Protected Member Functions

 process (ProcessedFile $processedFile, ResourceStorage $targetStorage)
 
Resource Processing ProcessorInterface getProcessorByTask (TaskInterface $task)
 

Protected Attributes

Resource ResourceStorage $storage
 
Resource Driver DriverInterface $driver
 
EventDispatcherInterface $eventDispatcher
 

Detailed Description

File processing service

Definition at line 37 of file FileProcessingService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Resource\Service\FileProcessingService::__construct ( ResourceStorage  $storage,
DriverInterface  $driver,
EventDispatcherInterface  $eventDispatcher = null 
)

Creates this object.

Parameters
Resource\ResourceStorage$storage
Resource\Driver\DriverInterface$driver
EventDispatcherInterface | null$eventDispatcher

Definition at line 68 of file FileProcessingService.php.

References TYPO3\CMS\Core\Resource\Service\FileProcessingService\$driver, TYPO3\CMS\Core\Resource\Service\FileProcessingService\$eventDispatcher, and TYPO3\CMS\Core\Resource\Service\FileProcessingService\$storage.

Member Function Documentation

◆ getProcessorByTask()

Resource Processing ProcessorInterface TYPO3\CMS\Core\Resource\Service\FileProcessingService::getProcessorByTask ( TaskInterface  $task)
protected
Parameters
Resource\Processing\TaskInterface$task
Returns
Resource\Processing\ProcessorInterface

Definition at line 160 of file FileProcessingService.php.

Referenced by TYPO3\CMS\Core\Resource\Service\FileProcessingService\process().

◆ process()

TYPO3\CMS\Core\Resource\Service\FileProcessingService::process ( ProcessedFile  $processedFile,
ResourceStorage  $targetStorage 
)
protected

◆ processFile()

Resource ProcessedFile TYPO3\CMS\Core\Resource\Service\FileProcessingService::processFile ( FileInterface  $fileObject,
ResourceStorage  $targetStorage,
  $taskType,
  $configuration 
)

Processes a file

Parameters
Resource\FileInterface$fileObject‪The file object
Resource\ResourceStorage$targetStorage‪The storage to store the processed file in
string$taskType
array$configuration
Returns
Resource\ProcessedFile
Exceptions

Definition at line 86 of file FileProcessingService.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), TYPO3\CMS\Core\Resource\ProcessedFile\CONTEXT_IMAGEPREVIEW, TYPO3\CMS\Core\Resource\Processing\LocalPreviewHelper\preProcessConfiguration(), and TYPO3\CMS\Core\Resource\Service\FileProcessingService\process().

Referenced by TYPO3\CMS\Core\Resource\ResourceStorage\processFile().

Member Data Documentation

◆ $driver

Resource Driver DriverInterface TYPO3\CMS\Core\Resource\Service\FileProcessingService::$driver
protected

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\Core\Resource\Service\FileProcessingService::$eventDispatcher
protected

◆ $storage

Resource ResourceStorage TYPO3\CMS\Core\Resource\Service\FileProcessingService::$storage
protected

◆ SIGNAL_PostFileProcess

const TYPO3\CMS\Core\Resource\Service\FileProcessingService::SIGNAL_PostFileProcess = 'postFileProcess'
Deprecated:
‪since TYPO3 v10.2, will be removed in TYPO3 v11. Use the PSR-14 event instead.

Definition at line 59 of file FileProcessingService.php.

Referenced by TYPO3\CMS\Core\Compatibility\SlotReplacement\onFileProcessingServiceEmitPostFileProcessSignal().

◆ SIGNAL_PreFileProcess

const TYPO3\CMS\Core\Resource\Service\FileProcessingService::SIGNAL_PreFileProcess = 'preFileProcess'
Deprecated:
‪since TYPO3 v10.2, will be removed in TYPO3 v11. Use the PSR-14 event instead.

Definition at line 54 of file FileProcessingService.php.

Referenced by TYPO3\CMS\Core\Compatibility\SlotReplacement\onFileProcessingServiceEmitPreFileProcessSignal().