DumperRoute.php 1.1 KB

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