DumperRoute.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. /**
  22. * @var string
  23. */
  24. private $name;
  25. /**
  26. * @var Route
  27. */
  28. private $route;
  29. /**
  30. * Constructor.
  31. *
  32. * @param string $name The route name
  33. * @param Route $route The route
  34. */
  35. public function __construct($name, Route $route)
  36. {
  37. $this->name = $name;
  38. $this->route = $route;
  39. }
  40. /**
  41. * Returns the route name.
  42. *
  43. * @return string The route name
  44. */
  45. public function getName()
  46. {
  47. return $this->name;
  48. }
  49. /**
  50. * Returns the route.
  51. *
  52. * @return Route The route
  53. */
  54. public function getRoute()
  55. {
  56. return $this->route;
  57. }
  58. }