protected function Router::matchCollection in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::matchCollection()
- 10 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::matchCollection()
Tries to match a URL with a set of routes.
Parameters
string $pathinfo: The path info to be parsed
\Symfony\Component\Routing\RouteCollection $routes: The set of routes.
Return value
array|null An array of parameters. NULL when there is no match.
1 call to Router::matchCollection()
- Router::matchRequest in core/
lib/ Drupal/ Core/ Routing/ Router.php - Tries to match a request with a set of routes.
File
- core/
lib/ Drupal/ Core/ Routing/ Router.php, line 150
Class
- Router
- Router implementation in Drupal.
Namespace
Drupal\Core\RoutingCode
protected function matchCollection($pathinfo, RouteCollection $routes) {
// Try a case-sensitive match.
$match = $this
->doMatchCollection($pathinfo, $routes, TRUE);
// Try a case-insensitive match.
if ($match === NULL && $routes
->count() > 0) {
$match = $this
->doMatchCollection($pathinfo, $routes, FALSE);
}
return $match;
}