W3cubDocs

/Symfony 2.8

Symfony\Component\Validator\Context\LegacyExecutionContextFactory

class LegacyExecutionContextFactory implements ExecutionContextFactoryInterface

Creates new {@link LegacyExecutionContext} instances.

Implemented for backward compatibility with Symfony < 2.5.

Methods

__construct(MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, string|null $translationDomain = null)

Creates a new context factory.

ExecutionContextInterface createContext(ValidatorInterface $validator, mixed $root)

Creates a new execution context.

Details

public __construct(MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, string|null $translationDomain = null)

Creates a new context factory.

Parameters

MetadataFactoryInterface $metadataFactory The metadata factory
TranslatorInterface $translator The translator
string|null $translationDomain The translation domain to use for translating violation messages

public ExecutionContextInterface createContext(ValidatorInterface $validator, mixed $root)

Creates a new execution context.

Parameters

ValidatorInterface $validator The validator
mixed $root The root value of the validated object graph

Return Value

ExecutionContextInterface The new execution context

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.html