class FileExtensionValidator implements ValidatorInterface (View source)

Constants

VALIDATOR_PRIORITY

Properties

protected ValidationService $validationService

Methods

__construct(ValidationService $validationService)

No description

$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.

Details

__construct(ValidationService $validationService)

No description

Parameters

ValidationService $validationService

$this readConfiguration(Repository $config)

Initialize the processor from the configured values.

Parameters

Repository $config

Return Value

$this

See also

ProcessorInterface::readConfiguration

int getValidationPriority()

Get the priority of this validator.

bool shouldValidate(ImportingFile $file, ImportOptions $options)

Check if this validator should validate a file being imported.

Parameters

ImportingFile $file

the file being imported

ImportOptions $options

options to b used when importing the file

Return Value

bool

See also

ValidatorInterface::shouldValidate

validate(ImportingFile $file, ImportOptions $options)

Validate a file being imported.

Parameters

ImportingFile $file

the file being imported

ImportOptions $options

options to b used when importing the file

Exceptions

ImportException

throws an ImportException in case the file is not valid

See also

ValidatorInterface::validate