PHP Класс Symfony\Component\Validator\Validator\RecursiveContextualValidator

С версии: 2.5
Автор: Bernhard Schussek ([email protected])
Наследование: implements Symfony\Component\Validator\Validator\ContextualValidatorInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Symfony\Component\Validator\Context\ExecutionContextInterface $context, Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface $metadataFactory, Symfony\Component\Validator\ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = [] ) Creates a validator for the given context.
atPath ( $path )
getViolations ( )
validate ( $value, $constraints = null, $groups = null )
validateProperty ( $object, $propertyName, $groups = null )
validatePropertyValue ( $objectOrClass, $propertyName, $value, $groups = null )

Защищенные методы

Метод Описание
normalizeGroups ( mixed $groups ) : array Normalizes the given group or list of groups to an array.

Приватные методы

Метод Описание
stepThroughGroupSequence ( mixed $value, object | null $object, string $cacheKey, Symfony\Component\Validator\Mapping\MetadataInterface $metadata = null, string $propertyPath, integer $traversalStrategy, GroupSequence $groupSequence, string | null $cascadedGroup, Symfony\Component\Validator\Context\ExecutionContextInterface $context ) Sequentially validates a node's value in each group of a group sequence.
validateClassNode ( object $object, string $cacheKey, Symfony\Component\Validator\Mapping\ClassMetadataInterface $metadata = null, string $propertyPath, array $groups, string[] | null $cascadedGroups, integer $traversalStrategy, Symfony\Component\Validator\Context\ExecutionContextInterface $context ) Validates a class node.
validateEachObjectIn ( array | Traversable $collection, string $propertyPath, array $groups, Symfony\Component\Validator\Context\ExecutionContextInterface $context ) Validates each object in a collection against the constraints defined for their classes.
validateGenericNode ( mixed $value, object | null $object, string $cacheKey, Symfony\Component\Validator\Mapping\MetadataInterface $metadata = null, string $propertyPath, array $groups, string[] | null $cascadedGroups, integer $traversalStrategy, Symfony\Component\Validator\Context\ExecutionContextInterface $context ) Validates a node that is not a class node.
validateInGroup ( mixed $value, string $cacheKey, Symfony\Component\Validator\Mapping\MetadataInterface $metadata, string $group, Symfony\Component\Validator\Context\ExecutionContextInterface $context ) Validates a node's value against all constraints in the given group.
validateObject ( object $object, string $propertyPath, array $groups, integer $traversalStrategy, Symfony\Component\Validator\Context\ExecutionContextInterface $context ) Validates an object against the constraints defined for its class.

Описание методов

__construct() публичный Метод

Creates a validator for the given context.
public __construct ( Symfony\Component\Validator\Context\ExecutionContextInterface $context, Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface $metadataFactory, Symfony\Component\Validator\ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = [] )
$context Symfony\Component\Validator\Context\ExecutionContextInterface The execution context
$metadataFactory Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface The factory for fetching the metadata of validated objects
$validatorFactory Symfony\Component\Validator\ConstraintValidatorFactoryInterface The factory for creating constraint validators
$objectInitializers array The object initializers

atPath() публичный Метод

public atPath ( $path )

getViolations() публичный Метод

public getViolations ( )

normalizeGroups() защищенный Метод

Normalizes the given group or list of groups to an array.
protected normalizeGroups ( mixed $groups ) : array
$groups mixed The groups to normalize
Результат array A group array

validate() публичный Метод

public validate ( $value, $constraints = null, $groups = null )

validateProperty() публичный Метод

public validateProperty ( $object, $propertyName, $groups = null )

validatePropertyValue() публичный Метод

public validatePropertyValue ( $objectOrClass, $propertyName, $value, $groups = null )