4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Validator\Context;
14 use Symfony\Component\Validator\Validator\ValidatorInterface;
17 * Creates instances of {@link ExecutionContextInterface}.
19 * You can use a custom factory if you want to customize the execution context
20 * that is passed through the validation run.
22 * @author Bernhard Schussek <bschussek@gmail.com>
24 interface ExecutionContextFactoryInterface
27 * Creates a new execution context.
29 * @param ValidatorInterface $validator The validator
30 * @param mixed $root The root value of the validated
33 * @return ExecutionContextInterface The new execution context
35 public function createContext(ValidatorInterface $validator, $root);