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

Expanded class hierarchy of RouterInterface

All classes that implement RouterInterface

3 files declare their use of RouterInterface
ChainedRouterInterface.php in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainedRouterInterface.php
ChainRouter.php in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainRouter.php
DynamicRouter.php in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/DynamicRouter.php

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/RouterInterface.php, line 24

Namespace

Symfony\Component\Routing
View source
interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface {

  /**
   * Gets the RouteCollection instance associated with this Router.
   *
   * @return RouteCollection A RouteCollection instance
   */
  public function getRouteCollection();

}

Members

Namesort descending Modifiers Type Description 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 constant Generates an absolute path, e.g. "/dir/file".
UrlGeneratorInterface::ABSOLUTE_URL 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. 4
UrlGeneratorInterface::NETWORK_PATH constant Generates a network path, e.g. "//example.com/dir/file". Such reference reuses the current scheme but specifies the host.
UrlGeneratorInterface::RELATIVE_PATH 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. 4