public function RecursiveValidator::startContext in Plug 7
Starts a new validation context and returns a validator for that context.
The returned validator collects all violations generated within its context. You can access these violations with the {@link ContextualValidatorInterface::getViolations()} method.
Return value
ContextualValidatorInterface The validator for the new context
Overrides ValidatorInterface::startContext
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Validator/ RecursiveValidator.php, line 71
Class
- RecursiveValidator
- Recursive implementation of {@link ValidatorInterface}.
Namespace
Symfony\Component\Validator\ValidatorCode
public function startContext($root = null) {
return new RecursiveContextualValidator($this->contextFactory
->createContext($this, $root), $this->metadataFactory, $this->validatorFactory, $this->objectInitializers);
}