vendor/sensio/framework-extra-bundle/src/Configuration/Route.php line 16

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <[email protected]>
  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 Sensio\Bundle\FrameworkExtraBundle\Configuration;
  11. use Symfony\Component\Routing\Annotation\Route as BaseRoute;
  12. @trigger_error(sprintf('The "%s" annotation is deprecated since version 5.2. Use "%s" instead.', Route::class, BaseRoute::class), E_USER_DEPRECATED);
  13. /**
  14. * @author Kris Wallsmith <[email protected]>
  15. * @Annotation
  16. *
  17. * @deprecated since version 5.2
  18. */
  19. class Route extends BaseRoute
  20. {
  21. private $service;
  22. public function setService($service)
  23. {
  24. // avoid a BC notice in case of @Route(service="") with sf ^2.7
  25. if (null === $this->getPath()) {
  26. $this->setPath('');
  27. }
  28. $this->service = $service;
  29. }
  30. public function getService()
  31. {
  32. return $this->service;
  33. }
  34. /**
  35. * Multiple route annotations are allowed.
  36. *
  37. * @return bool
  38. *
  39. * @see ConfigurationInterface
  40. */
  41. public function allowArray()
  42. {
  43. return true;
  44. }
  45. }