Drupal investigation

LegacyExecutionContext.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. @trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
  12. use Symfony\Component\Translation\TranslatorInterface;
  13. use Symfony\Component\Validator\MetadataFactoryInterface;
  14. use Symfony\Component\Validator\Validator\ValidatorInterface;
  15. /**
  16. * An execution context that is compatible with the legacy API (< 2.5).
  17. *
  18. * @author Bernhard Schussek <bschussek@gmail.com>
  19. *
  20. * @deprecated since version 2.5, to be removed in 3.0.
  21. */
  22. class LegacyExecutionContext extends ExecutionContext
  23. {
  24. /**
  25. * @var MetadataFactoryInterface
  26. */
  27. private $metadataFactory;
  28. /**
  29. * Creates a new context.
  30. *
  31. * @see ExecutionContext::__construct()
  32. *
  33. * @internal Called by {@link LegacyExecutionContextFactory}. Should not be used
  34. * in user code.
  35. */
  36. public function __construct(ValidatorInterface $validator, $root, MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null)
  37. {
  38. parent::__construct(
  39. $validator,
  40. $root,
  41. $translator,
  42. $translationDomain
  43. );
  44. $this->metadataFactory = $metadataFactory;
  45. }
  46. }