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

Public Member Functions

 __construct (protected readonly EventDispatcherInterface $eventDispatcher, protected readonly ProcessedFileRepository $processedFileRepository, protected readonly ProcessorRegistry $processorRegistry,)
 
 processFile (File|FileReference $fileObject, string $taskType, DriverInterface $driver, array $configuration)
 

Protected Member Functions

 getProcessorByTask (TaskInterface $task)
 

Detailed Description

This is a general service for creating Processed Files a.k.a. processing a File object with a given configuration.

This is how it works: -> File->process(string $taskType, array $configuration) -> ResourceStorage->processFile(File $file, $taskType, array $configuration) -> FileProcessingService->processFile(File $file, $taskType, array $configuration)

This class then transforms the information of a Task through a Processor into a ProcessedFile object. For this, the DB is checked if there is a ProcessedFile which has been processed or does not need to be processed. If processing is required, a valid Processor is searched for to process the Task object (which is retrieved from ProcessedFile->getTask()).

Definition at line 45 of file FileProcessingService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Resource\Service\FileProcessingService::__construct ( protected readonly EventDispatcherInterface  $eventDispatcher,
protected readonly ProcessedFileRepository  $processedFileRepository,
protected readonly ProcessorRegistry  $processorRegistry 
)

Definition at line 47 of file FileProcessingService.php.

Member Function Documentation

◆ getProcessorByTask()

TYPO3\CMS\Core\Resource\Service\FileProcessingService::getProcessorByTask ( TaskInterface  $task)
protected

◆ processFile()

TYPO3\CMS\Core\Resource\Service\FileProcessingService::processFile ( File|FileReference  $fileObject,
string  $taskType,
DriverInterface  $driver,
array  $configuration 
)