ProcessingRule
A processing Rule contains information for property mapping and validation.
Scope: frontend This class is NOT meant to be sub classed by developers.
Attributes
- #[Autoconfigure]
- $public: true
- $shared: false
Table of Contents
Properties
- $dataType : string
- The target data type the data should be converted to
- $processingMessages : Result
- $propertyMapper : PropertyMapper
- $propertyMappingConfiguration : PropertyMappingConfiguration
- $validator : ConjunctionValidator
Methods
- __construct() : mixed
- Constructs this processing rule
- addValidator() : mixed
- filterValidators() : void
- Filters validators based on a closure
- getDataType() : string
- getProcessingMessages() : Result
- getPropertyMappingConfiguration() : PropertyMappingConfiguration
- getValidators() : SplObjectStorage
- Returns the child validators of the ConjunctionValidator that is bound to this processing rule
- process() : mixed
- removeAllValidators() : void
- Initializes a new validator container
- removeValidator() : mixed
- Removes the specified validator.
- setDataType() : mixed
Properties
$dataType
The target data type the data should be converted to
protected
string
$dataType
$processingMessages
protected
Result
$processingMessages
$propertyMapper read-only
protected
PropertyMapper
$propertyMapper
$propertyMappingConfiguration
protected
PropertyMappingConfiguration
$propertyMappingConfiguration
$validator
protected
ConjunctionValidator
$validator
Methods
__construct()
Constructs this processing rule
public
__construct(PropertyMapper $propertyMapper, ValidatorResolver $validatorResolver) : mixed
Parameters
- $propertyMapper : PropertyMapper
- $validatorResolver : ValidatorResolver
addValidator()
public
addValidator(ValidatorInterface $validator) : mixed
Parameters
- $validator : ValidatorInterface
filterValidators()
Filters validators based on a closure
public
filterValidators(Closure $filter) : void
Parameters
- $filter : Closure
getDataType()
public
getDataType() : string
Return values
stringgetProcessingMessages()
public
getProcessingMessages() : Result
Return values
ResultgetPropertyMappingConfiguration()
public
getPropertyMappingConfiguration() : PropertyMappingConfiguration
Return values
PropertyMappingConfigurationgetValidators()
Returns the child validators of the ConjunctionValidator that is bound to this processing rule
public
getValidators() : SplObjectStorage
Return values
SplObjectStorageprocess()
public
process(mixed $value) : mixed
Parameters
- $value : mixed
removeAllValidators()
Initializes a new validator container
public
removeAllValidators() : void
removeValidator()
Removes the specified validator.
public
removeValidator(ValidatorInterface $validator) : mixed
Parameters
- $validator : ValidatorInterface
-
The validator to remove
Tags
setDataType()
public
setDataType(string $dataType) : mixed
Parameters
- $dataType : string