Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Router.php

function Router::matchRequest

Same name in this branch
  1. 11.1.x vendor/symfony/routing/Router.php \Symfony\Component\Routing\Router::matchRequest()

Overrides UrlMatcher::matchRequest

1 call to Router::matchRequest()
Router::match in core/lib/Drupal/Core/Routing/Router.php
Tries to match a URL path with a set of routes.

File

core/lib/Drupal/Core/Routing/Router.php, line 115

Class

Router
Router implementation in Drupal.

Namespace

Drupal\Core\Routing

Code

public function matchRequest(Request $request) : array {
    $collection = $this->getInitialRouteCollection($request);
    if ($collection->count() === 0) {
        throw new ResourceNotFoundException(sprintf('No routes found for "%s".', $this->currentPath
            ->getPath()));
    }
    $collection = $this->applyRouteFilters($collection, $request);
    $collection = $this->applyFitOrder($collection);
    $ret = $this->matchCollection(rawurldecode($this->currentPath
        ->getPath($request)), $collection);
    return $this->applyRouteEnhancers($ret, $request);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal