PHP 클래스 Symfony\Component\Validator\Validator\RecursiveContextualValidator

부터: 2.5
저자: Bernhard Schussek ([email protected])
상속: implements Symfony\Component\Validator\Validator\ContextualValidatorInterface
파일 보기 프로젝트 열기: symfony/symfony

공개 메소드들

메소드 설명
__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 )