public function DynamicRouter::getMatcher

Return value

RequestMatcherInterface|UrlMatcherInterface

2 calls to DynamicRouter::getMatcher()
DynamicRouter::match in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/DynamicRouter.php
Tries to match a URL path with a set of routes.
DynamicRouter::matchRequest in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/DynamicRouter.php
Tries to match a request with a set of routes and returns the array of information for that route.

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/DynamicRouter.php, line 92

Class

DynamicRouter
A flexible router accepting matcher and generator through injection and using the RouteEnhancer concept to generate additional data on the routes.

Namespace

Symfony\Cmf\Component\Routing

Code

public function getMatcher() {

  /* we may not set the context in DynamicRouter::setContext as this
   * would lead to symfony cache warmup problems.
   * a request matcher does not need the request context separately as it
   * can get it from the request.
   */
  if ($this->matcher instanceof RequestContextAwareInterface) {
    $this->matcher
      ->setContext($this
      ->getContext());
  }
  return $this->matcher;
}