‪TYPO3CMS  11.5
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

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

Protected Member Functions

 initializeDefaultOptions (array $options)
 

Protected Attributes

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

Detailed Description

An abstract composite validator consisting of other validators

Definition at line 24 of file AbstractCompositeValidator.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::__construct ( array  $options = [])

Constructs the composite validator and sets validation options

Parameters
array$options‪Options for the validator
Exceptions

Definition at line 51 of file AbstractCompositeValidator.php.

References TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator\initializeDefaultOptions().

Member Function Documentation

◆ addValidator()

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

Adds a new validator to the conjunction.

Parameters
\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface$validator‪The validator that should be added

Definition at line 61 of file AbstractCompositeValidator.php.

References $validator.

◆ count()

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

Returns the number of validators contained in this conjunction.

Returns
‪int The number of validators
Todo:
‪Set to return type int as breaking change in v12.

Definition at line 87 of file AbstractCompositeValidator.php.

◆ getOptions()

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

Returns the options for this validator

Returns
‪array

Implements TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface.

Definition at line 107 of file AbstractCompositeValidator.php.

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

◆ getValidators()

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

◆ initializeDefaultOptions()

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

◆ removeValidator()

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

Removes the specified validator.

Parameters
\TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface$validator‪The validator to remove
Exceptions

Definition at line 72 of file AbstractCompositeValidator.php.

References $validator.

◆ setValidatedInstancesContainer()

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

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

Parameters
\SplObjectStorage$validatedInstancesContainer‪A container to keep track of validated instances

Implements TYPO3\CMS\Extbase\Validation\Validator\ObjectValidatorInterface.

Definition at line 117 of file AbstractCompositeValidator.php.

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

Member Data Documentation

◆ $options

array TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator::$options = array( )
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 30 of file AbstractCompositeValidator.php.

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

◆ $validatedInstancesContainer

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

◆ $validators

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