SvgProcessor
class SvgProcessor implements ValidatorInterface, PreProcessorInterface (View source)
Constants
ACTION_DISABLED |
Processor action: do not perform any checks. |
ACTION_CHECKVALIDITY |
Processor action: check only that the SVG is a valid XML file. |
ACTION_SANITIZE |
Processor action: sanitize the file. |
ACTION_REJECT |
Processor action: reject the file. |
ACTION_DEFAULT |
Default processor action. |
Properties
protected Sanitizer | $sanitizer | The SVG sanitizer. |
|
protected SanitizerOptions | $sanitizerOptions | The SVG sanitizer options. |
|
private string | $action | The action that this processor should perform. |
Methods
Get the priority of this validator.
Check if this validator should validate a file being imported.
Get the priority of this pre-processor.
Check if this pre-processor should process a file being imported.
Get the action that should be taken.
Set the action that should be taken.
Details
__construct(Sanitizer $sanitizer, SanitizerOptions $sanitizerOptions)
Initialize the instance.
$this
readConfiguration(Repository $config)
Initialize the processor from the configured values.
int
getValidationPriority()
Get the priority of this validator.
bool
shouldValidate(ImportingFile $file, ImportOptions $options)
Check if this validator should validate a file being imported.
validate(ImportingFile $file, ImportOptions $options)
Validate a file being imported.
int
getPreProcessPriority()
Get the priority of this pre-processor.
bool
shouldPreProcess(ImportingFile $file, ImportOptions $options)
Check if this pre-processor should process a file being imported.
preProcess(ImportingFile $file, ImportOptions $options)
Pre-process a file being imported.
string
getAction()
Get the action that should be taken.
$this
setAction(string $value)
Set the action that should be taken.