interface RouterInterface
RouterInterface is the interface that all Router classes must implement.
This interface is the concatenation of UrlMatcherInterface and UrlGeneratorInterface.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- interface \Symfony\Component\Routing\Generator\UrlGeneratorInterface extends \Symfony\Component\Routing\RequestContextAwareInterface; interface \Symfony\Component\Routing\Matcher\UrlMatcherInterface extends \Symfony\Component\Routing\RequestContextAwareInterface
- interface \Symfony\Component\Routing\RouterInterface extends \Symfony\Component\Routing\Matcher\UrlMatcherInterface \Symfony\Component\Routing\Generator\UrlGeneratorInterface
Expanded class hierarchy of RouterInterface
All classes that implement RouterInterface
5 files declare their use of RouterInterface
- AccessAwareRouter.php in core/
lib/ Drupal/ Core/ Routing/ AccessAwareRouter.php - AccessAwareRouterInterface.php in core/
lib/ Drupal/ Core/ Routing/ AccessAwareRouterInterface.php - DynamicLocalTasks.php in core/
modules/ content_moderation/ src/ Plugin/ Derivative/ DynamicLocalTasks.php - EntityAccessChecker.php in core/
modules/ jsonapi/ src/ Access/ EntityAccessChecker.php - Router.php in core/
lib/ Drupal/ Core/ Routing/ Router.php
File
-
vendor/
symfony/ routing/ RouterInterface.php, line 24
Namespace
Symfony\Component\RoutingView source
interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface {
/**
* Gets the RouteCollection instance associated with this Router.
*
* WARNING: This method should never be used at runtime as it is SLOW.
* You might use it in a cache warmer though.
*/
public function getRouteCollection() : RouteCollection;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
RequestContextAwareInterface::getContext | public | function | Gets the request context. | 6 |
RequestContextAwareInterface::setContext | public | function | Sets the request context. | 6 |
RouterInterface::getRouteCollection | public | function | Gets the RouteCollection instance associated with this Router. | 3 |
UrlGeneratorInterface::ABSOLUTE_PATH | public | constant | Generates an absolute path, e.g. "/dir/file". | |
UrlGeneratorInterface::ABSOLUTE_URL | public | constant | Generates an absolute URL, e.g. "http://example.com/dir/file". | |
UrlGeneratorInterface::generate | public | function | Generates a URL or path for a specific route based on the given parameters. | 6 |
UrlGeneratorInterface::NETWORK_PATH | public | constant | Generates a network path, e.g. "//example.com/dir/file". Such reference reuses the current scheme but specifies the host. |
|
UrlGeneratorInterface::RELATIVE_PATH | public | constant | Generates a relative path based on the current request path, e.g. "../parent-file". | |
UrlMatcherInterface::match | public | function | Tries to match a URL path with a set of routes. | 3 |