function Router::matchRequest
Same name in this branch
- 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\RoutingCode
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);
}