菜谱项目

DumperRoute.php 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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\Routing\Matcher\Dumper;
  11. use Symfony\Component\Routing\Route;
  12. /**
  13. * Container for a Route.
  14. *
  15. * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
  16. *
  17. * @internal
  18. */
  19. class DumperRoute
  20. {
  21. private $name;
  22. private $route;
  23. /**
  24. * @param string $name The route name
  25. * @param Route $route The route
  26. */
  27. public function __construct($name, Route $route)
  28. {
  29. $this->name = $name;
  30. $this->route = $route;
  31. }
  32. /**
  33. * Returns the route name.
  34. *
  35. * @return string The route name
  36. */
  37. public function getName()
  38. {
  39. return $this->name;
  40. }
  41. /**
  42. * Returns the route.
  43. *
  44. * @return Route The route
  45. */
  46. public function getRoute()
  47. {
  48. return $this->route;
  49. }
  50. }