‪TYPO3CMS  ‪main
TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator:
TYPO3\CMS\Extbase\Validation\Validator\ObjectValidatorInterface TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator\Fixture\AbstractCompositeValidatorClass TYPO3\CMS\Extbase\Validation\Validator\ConjunctionValidator TYPO3\CMS\Extbase\Validation\Validator\DisjunctionValidator

Public Member Functions

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

Protected Member Functions

 initializeDefaultOptions (array $options)
 

Protected Attributes

array $supportedOptions = array( )
 
array $options = []
 
SplObjectStorage $validators
 
SplObjectStorage $validatedInstancesContainer
 

Detailed Description

An abstract composite validator consisting of other validators

Definition at line 26 of file AbstractCompositeValidator.php.

Member Function Documentation

◆ addValidator()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::addValidator ( ValidatorInterface  $validator)

Adds a new validator to the composition.

Definition at line 54 of file AbstractCompositeValidator.php.

References $validator.

Referenced by TYPO3\CMS\Extbase\Validation\ValidatorResolver\buildBaseValidatorConjunction().

◆ count()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::count ( )

Returns the number of validators contained in this composition.

Definition at line 75 of file AbstractCompositeValidator.php.

◆ getOptions()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::getOptions ( )

◆ getValidators()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::getValidators ( )

◆ initializeDefaultOptions()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::initializeDefaultOptions ( array  $options)
protected

Initialize default options.

Exceptions
InvalidValidationOptionsException

Definition at line 108 of file AbstractCompositeValidator.php.

References TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator\$options.

Referenced by TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator\setOptions().

◆ removeValidator()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::removeValidator ( ValidatorInterface  $validator)

Removes the specified validator.

Exceptions
NoSuchValidatorException

Definition at line 64 of file AbstractCompositeValidator.php.

References $validator.

◆ setOptions()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::setOptions ( array  $options)

◆ setValidatedInstancesContainer()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::setValidatedInstancesContainer ( \SplObjectStorage  $validatedInstancesContainer)

Member Data Documentation

◆ $options

array TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::$options = []
protected

◆ $supportedOptions

array TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::$supportedOptions = array( )
protected

This contains the supported options, their default values and descriptions.

Definition at line 32 of file AbstractCompositeValidator.php.

◆ $validatedInstancesContainer

SplObjectStorage TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::$validatedInstancesContainer
protected
Todo:
‪: Properties {
See also
‪self::$validators} and {
‪self::$validatedInstancesContainer} are not properly initialized in this class because introducing a constructor is considered possibly breaking. However, it is unlikely that anyone extends this validator. Hence, it should be marked

in v13 and get a constructor. Both framework validators that extend this class, {

See also
ConjunctionValidator} and {
DisjunctionValidator} do have a constructor. Their constructors need to be removed again then.

Definition at line 44 of file AbstractCompositeValidator.php.

Referenced by TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator\setValidatedInstancesContainer().

◆ $validators

SplObjectStorage TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::$validators
protected