class ExecutionContextFactory implements ExecutionContextFactoryInterface

Creates new {@link ExecutionContext} instances.

Methods

__construct(TranslatorInterface $translator, string $translationDomain = null)

Creates a new context factory.

createContext(ValidatorInterface $validator, mixed $root)

Creates a new execution context.

Details

at line 37
__construct(TranslatorInterface $translator, string $translationDomain = null)

Creates a new context factory.

Parameters

TranslatorInterface $translator The translator
string $translationDomain The translation domain to use for translating violation messages

at line 46
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