ExecutionContextFactory

ExecutionContextFactory

class ExecutionContextFactory implements ExecutionContextFactoryInterface

Creates new {@link ExecutionContext} instances.

Methods

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

Creates a new context factory.

ExecutionContextInterface createContext(ValidatorInterface $validator, mixed $root)

Creates a new execution context.

Details

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

Creates a new context factory.

Parameters

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

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–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/Validator/Context/ExecutionContextFactory.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部