You are here

public function RecursiveValidator::inContext in Plug 7

Returns a validator in the given execution context.

The returned validator adds all generated violations to the given context.

Parameters

ExecutionContextInterface $context The execution context:

Return value

ContextualValidatorInterface The validator for that context

Overrides ValidatorInterface::inContext

File

lib/Symfony/validator/Symfony/Component/Validator/Validator/RecursiveValidator.php, line 84

Class

RecursiveValidator
Recursive implementation of {@link ValidatorInterface}.

Namespace

Symfony\Component\Validator\Validator

Code

public function inContext(ExecutionContextInterface $context) {
  return new RecursiveContextualValidator($context, $this->metadataFactory, $this->validatorFactory, $this->objectInitializers);
}