AbstractCompositeValidator
abstract class AbstractCompositeValidator implements ObjectValidatorInterface, Countable (View source)
An abstract composite validator consisting of other validators
Properties
protected array | $supportedOptions | This contains the supported options, their default values and descriptions. |
|
protected array | $options | ||
protected SplObjectStorage | $validators | ||
protected SplObjectStorage | $validatedInstancesContainer |
Methods
Constructs the composite validator and sets validation options
Allows to set a container to keep track of validated instances.
Returns the number of validators contained in this conjunction.
Returns the child validators of this Composite Validator
Returns the options for this validator
Details
__construct(array $options = [])
Constructs the composite validator and sets validation options
void
setValidatedInstancesContainer(SplObjectStorage $validatedInstancesContainer)
Allows to set a container to keep track of validated instances.
void
addValidator(ValidatorInterface $validator)
Adds a new validator to the conjunction.
removeValidator(ValidatorInterface $validator)
Removes the specified validator.
int
count()
Returns the number of validators contained in this conjunction.
SplObjectStorage
getValidators()
Returns the child validators of this Composite Validator
array
getOptions()
Returns the options for this validator