TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
AbstractCompositeValidator Class Reference
Inheritance diagram for AbstractCompositeValidator:
ObjectValidatorInterface ValidatorInterface AbstractCompositeValidatorClass ConjunctionValidator DisjunctionValidator

Public Member Functions

 __construct (array $options=[])
 
 addValidator (\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface $validator)
 
 removeValidator (\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface $validator)
 
 count ()
 
 getValidators ()
 
 getOptions ()
 
 setValidatedInstancesContainer (\SplObjectStorage $validatedInstancesContainer)
 
- Public Member Functions inherited from ValidatorInterface
 validate ($value)
 

Protected Attributes

 $supportedOptions = []
 
 $options = []
 
 $validators
 
 $validatedInstancesContainer
 

Detailed Description

An abstract composite validator consisting of other validators

Definition at line 22 of file AbstractCompositeValidator.php.

Constructor & Destructor Documentation

__construct ( array  $options = [])

Constructs the composite validator and sets validation options

Parameters
array$optionsOptions for the validator
Exceptions
TYPO3

Definition at line 53 of file AbstractCompositeValidator.php.

References AbstractCompositeValidator\$options, and AbstractCompositeValidator\$supportedOptions.

Member Function Documentation

Adds a new validator to the conjunction.

Parameters
\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface$validatorThe validator that should be added
Returns
void

Definition at line 91 of file AbstractCompositeValidator.php.

References AbstractCompositeValidator\$validatedInstancesContainer.

Referenced by ValidatorResolver\addCustomValidators().

count ( )

Returns the number of validators contained in this conjunction.

Returns
int The number of validators

Definition at line 121 of file AbstractCompositeValidator.php.

getOptions ( )

Returns the options for this validator

Returns
array

Implements ValidatorInterface.

Definition at line 141 of file AbstractCompositeValidator.php.

References AbstractCompositeValidator\$options.

getValidators ( )

Returns the child validators of this Composite Validator

Returns

Definition at line 131 of file AbstractCompositeValidator.php.

References AbstractCompositeValidator\$validators.

Referenced by DisjunctionValidator\validate().

Removes the specified validator.

Parameters
\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface$validatorThe validator to remove
Exceptions
TYPO3
Returns
void

Definition at line 107 of file AbstractCompositeValidator.php.

setValidatedInstancesContainer ( \SplObjectStorage  $validatedInstancesContainer)

Allows to set a container to keep track of validated instances.

Parameters
\SplObjectStorage$validatedInstancesContainerA container to keep track of validated instances
Returns
void

Implements ObjectValidatorInterface.

Definition at line 153 of file AbstractCompositeValidator.php.

References AbstractCompositeValidator\$validatedInstancesContainer.

Member Data Documentation

$options = []
protected
$supportedOptions = []
protected
$validatedInstancesContainer
protected
$validators
protected