NullRouteMatch.php 833 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace Drupal\Core\Routing;
  3. use Symfony\Component\HttpFoundation\ParameterBag;
  4. /**
  5. * Stub implementation of RouteMatchInterface for when there's no matched route.
  6. */
  7. class NullRouteMatch implements RouteMatchInterface {
  8. /**
  9. * {@inheritdoc}
  10. */
  11. public function getRouteName() {
  12. return NULL;
  13. }
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public function getRouteObject() {
  18. return NULL;
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function getParameter($parameter_name) {
  24. return NULL;
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function getParameters() {
  30. return new ParameterBag();
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function getRawParameter($parameter_name) {
  36. return NULL;
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function getRawParameters() {
  42. return new ParameterBag();
  43. }
  44. }