LegacyExecutionContext.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 Symfony 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. * Creates a new context.
  26. *
  27. * @see ExecutionContext::__construct()
  28. *
  29. * @internal Called by {@link LegacyExecutionContextFactory}. Should not be used
  30. * in user code.
  31. */
  32. public function __construct(ValidatorInterface $validator, $root, MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null)
  33. {
  34. parent::__construct(
  35. $validator,
  36. $root,
  37. $translator,
  38. $translationDomain
  39. );
  40. }
  41. }