Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

vendor/symfony/validator/Context/ExecutionContextFactory.php line 29

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Component\Validator\Context;
  11. use Symfony\Component\Validator\Validator\ValidatorInterface;
  12. use Symfony\Contracts\Translation\TranslatorInterface;
  13. /**
  14.  * Creates new {@link ExecutionContext} instances.
  15.  *
  16.  * @author Bernhard Schussek <bschussek@gmail.com>
  17.  *
  18.  * @internal version 2.5. Code against ExecutionContextFactoryInterface instead.
  19.  */
  20. class ExecutionContextFactory implements ExecutionContextFactoryInterface
  21. {
  22.     private $translator;
  23.     private $translationDomain;
  24.     public function __construct(TranslatorInterface $translatorstring $translationDomain null)
  25.     {
  26.         $this->translator $translator;
  27.         $this->translationDomain $translationDomain;
  28.     }
  29.     /**
  30.      * {@inheritdoc}
  31.      */
  32.     public function createContext(ValidatorInterface $validator$root)
  33.     {
  34.         return new ExecutionContext(
  35.             $validator,
  36.             $root,
  37.             $this->translator,
  38.             $this->translationDomain
  39.         );
  40.     }
  41. }