class RecursiveContextualValidator implements ContextualValidatorInterface
Recursive implementation of {@link ContextualValidatorInterface}.
__construct(ExecutionContextInterface $context, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, array $objectInitializers = array()) Creates a validator for the given context. | ||
$this | atPath(string $path) Appends the given path to the property path of the context. | |
$this | validate(mixed $value, Constraint|Constraint[] $constraints = null, string|GroupSequence|(string|GroupSequence)[]|null $groups = null) Validates a value against a constraint or a list of constraints. | |
$this | validateProperty(object $object, string $propertyName, string|GroupSequence|(string|GroupSequence)[]|null $groups = null) Validates a property of an object against the constraints specified for this property. | |
$this | validatePropertyValue(object|string $objectOrClass, string $propertyName, mixed $value, string|GroupSequence|(string|GroupSequence)[]|null $groups = null) Validates a value against the constraints specified for an object's property. | |
ConstraintViolationListInterface | getViolations() Returns the violations that have been generated so far in the context of the validator. | |
(string|GroupSequence)[] | normalizeGroups(string|GroupSequence|(string|GroupSequence)[] $groups) Normalizes the given group or list of groups to an array. |
Creates a validator for the given context.
ExecutionContextInterface | $context | The execution context |
MetadataFactoryInterface | $metadataFactory | The factory for fetching the metadata of validated objects |
ConstraintValidatorFactoryInterface | $validatorFactory | The factory for creating constraint validators |
array | $objectInitializers | The object initializers |
Appends the given path to the property path of the context.
If called multiple times, the path will always be reset to the context's original path with the given path appended to it.
string | $path | The path to append |
$this |
Validates a value against a constraint or a list of constraints.
If no constraint is passed, the constraint {@link \Symfony\Component\Validator\Constraints\Valid} is assumed.
mixed | $value | The value to validate |
Constraint|Constraint[] | $constraints | The constraint(s) to validate against |
string|GroupSequence|(string|GroupSequence)[]|null | $groups | The validation groups to validate. If none is given, "Default" is assumed |
$this |
Validates a property of an object against the constraints specified for this property.
object | $object | The object |
string | $propertyName | The name of the validated property |
string|GroupSequence|(string|GroupSequence)[]|null | $groups | The validation groups to validate. If none is given, "Default" is assumed |
$this |
Validates a value against the constraints specified for an object's property.
object|string | $objectOrClass | The object or its class name |
string | $propertyName | The name of the property |
mixed | $value | The value to validate against the property's constraints |
string|GroupSequence|(string|GroupSequence)[]|null | $groups | The validation groups to validate. If none is given, "Default" is assumed |
$this |
Returns the violations that have been generated so far in the context of the validator.
ConstraintViolationListInterface | The constraint violations |
Normalizes the given group or list of groups to an array.
string|GroupSequence|(string|GroupSequence)[] | $groups | The groups to normalize |
(string|GroupSequence)[] | A group array |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Validator/Validator/RecursiveContextualValidator.html