TYPO3
7.6
|
Public Member Functions | |
__construct (Resource\ProcessedFile $targetFile, array $configuration) | |
getConfigurationChecksum () | |
getTargetFilename () | |
getTargetFileExtension () | |
getName () | |
getType () | |
getTargetFile () | |
setTargetFile (Resource\ProcessedFile $targetFile) | |
getSourceFile () | |
setSourceFile (Resource\File $sourceFile) | |
getConfiguration () | |
isExecuted () | |
setExecuted ($successful) | |
isSuccessful () | |
Public Member Functions inherited from TaskInterface | |
getTargetFileName () | |
fileNeedsProcessing () | |
Protected Member Functions | |
getChecksumData () | |
isValidConfiguration (array $configuration) | |
Protected Attributes | |
$checksumData = array() | |
$targetFile | |
$sourceFile | |
$configuration | |
$type | |
$name | |
$executed = false | |
$successful | |
Abstract base implementation of a task.
If you extend this class, make sure that you redefine the member variables $type and $name or set them in the constructor. Otherwise your task won't be recognized by the system and several things will fail.
Definition at line 27 of file core/Classes/Resource/Processing/AbstractTask.php.
__construct | ( | Resource\ProcessedFile | $targetFile, |
array | $configuration | ||
) |
Resource\ProcessedFile | $targetFile | |
array | $configuration |
Implements TaskInterface.
Definition at line 73 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$configuration, and AbstractTask\$targetFile.
|
protected |
Sets parameters needed in the checksum. Can be overridden to add additional parameters to the checksum. This should include all parameters that could possibly vary between different task instances, e.g. the TYPO3 image configuration in TYPO3_CONF_VARS[GFX] for graphic processing tasks.
Definition at line 87 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\getName(), AbstractTask\getSourceFile(), and AbstractTask\getType().
Referenced by AbstractTask\getConfigurationChecksum().
getConfiguration | ( | ) |
Implements TaskInterface.
Definition at line 184 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$configuration.
getConfigurationChecksum | ( | ) |
Returns the checksum for this task's configuration, also taking the file and task type into account.
Implements TaskInterface.
Definition at line 101 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\getChecksumData(), and GeneralUtility\shortMD5().
Referenced by AbstractGraphicalTask\getTargetFilename(), and AbstractTask\getTargetFilename().
getName | ( | ) |
Returns the name of this task
Implements TaskInterface.
Definition at line 134 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$name.
Referenced by AbstractTask\getChecksumData().
getSourceFile | ( | ) |
Implements TaskInterface.
Definition at line 168 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$sourceFile.
Referenced by AbstractGraphicalTask\determineTargetFileExtension(), AbstractTask\getChecksumData(), and AbstractGraphicalTask\getTargetFilename().
getTargetFile | ( | ) |
Implements TaskInterface.
Definition at line 152 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$targetFile.
getTargetFileExtension | ( | ) |
Gets the file extension the processed file should have in the filesystem.
Implements TaskInterface.
Definition at line 124 of file core/Classes/Resource/Processing/AbstractTask.php.
Referenced by AbstractTask\getTargetFilename().
getTargetFilename | ( | ) |
Returns the filename
Definition at line 111 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\getConfigurationChecksum(), and AbstractTask\getTargetFileExtension().
getType | ( | ) |
Returns the type of this task
Implements TaskInterface.
Definition at line 144 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$type.
Referenced by AbstractTask\getChecksumData().
isExecuted | ( | ) |
Returns TRUE if this task has been executed, no matter if the execution was successful.
Implements TaskInterface.
Definition at line 203 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$executed.
isSuccessful | ( | ) |
Returns TRUE if this task has been successfully executed. Only call this method if the task has been processed at all.
\LogicException | If the task has not been executed already |
Implements TaskInterface.
Definition at line 227 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$successful.
|
abstractprotected |
Checks if the given configuration is sensible for this task, i.e. if all required parameters are given, within the boundaries and don't conflict with each other.
array | $configuration |
setExecuted | ( | $successful | ) |
Set this task executed. This is used by the Processors in order to transfer the state of this task to the file processing service.
bool | $successful | Set this to FALSE if executing the task failed |
Implements TaskInterface.
Definition at line 215 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$successful.
setSourceFile | ( | Resource\File | $sourceFile | ) |
Resource\File | $sourceFile |
Definition at line 176 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$sourceFile.
setTargetFile | ( | Resource\ProcessedFile | $targetFile | ) |
Resource\ProcessedFile | $targetFile |
Definition at line 160 of file core/Classes/Resource/Processing/AbstractTask.php.
References AbstractTask\$targetFile.
|
protected |
Definition at line 32 of file core/Classes/Resource/Processing/AbstractTask.php.
|
protected |
Definition at line 47 of file core/Classes/Resource/Processing/AbstractTask.php.
Referenced by AbstractTask\__construct(), and AbstractTask\getConfiguration().
|
protected |
Definition at line 62 of file core/Classes/Resource/Processing/AbstractTask.php.
Referenced by AbstractTask\isExecuted().
|
protected |
Definition at line 57 of file core/Classes/Resource/Processing/AbstractTask.php.
Referenced by AbstractTask\getName().
|
protected |
Definition at line 42 of file core/Classes/Resource/Processing/AbstractTask.php.
Referenced by AbstractTask\getSourceFile(), and AbstractTask\setSourceFile().
|
protected |
Definition at line 67 of file core/Classes/Resource/Processing/AbstractTask.php.
Referenced by AbstractTask\isSuccessful(), and AbstractTask\setExecuted().
|
protected |
Definition at line 37 of file core/Classes/Resource/Processing/AbstractTask.php.
Referenced by AbstractTask\__construct(), AbstractTask\getTargetFile(), and AbstractTask\setTargetFile().
|
protected |
Definition at line 52 of file core/Classes/Resource/Processing/AbstractTask.php.
Referenced by AbstractTask\getType().