AccessAwareRouterInterface.php 918 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Drupal\Core\Routing;
  3. use Symfony\Component\HttpFoundation\Request;
  4. use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
  5. use Symfony\Component\Routing\RouterInterface;
  6. /**
  7. * Interface for a router class for Drupal with access check and upcasting.
  8. */
  9. interface AccessAwareRouterInterface extends RouterInterface, RequestMatcherInterface {
  10. /**
  11. * Attribute name of the access result for the request..
  12. */
  13. const ACCESS_RESULT = '_access_result';
  14. /**
  15. * {@inheritdoc}
  16. *
  17. * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
  18. * Thrown when access checking failed.
  19. */
  20. public function matchRequest(Request $request);
  21. /**
  22. * {@inheritdoc}
  23. *
  24. * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
  25. * Thrown when $access_check is enabled and access checking failed.
  26. */
  27. public function match($pathinfo);
  28. }