public function UrlMatcher::finalMatch in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php \Symfony\Cmf\Component\Routing\NestedMatcher\UrlMatcher::finalMatch()
- 8 core/lib/Drupal/Core/Routing/UrlMatcher.php \Drupal\Core\Routing\UrlMatcher::finalMatch()
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Routing/UrlMatcher.php \Drupal\Core\Routing\UrlMatcher::finalMatch()
Matches a request against a route collection and returns exactly one result.
Parameters
RouteCollection $collection The collection against which to match.:
Request $request The request to match.:
Return value
array An array of parameters
Throws
ResourceNotFoundException if none of the routes in $collection matches $request
Overrides UrlMatcher::finalMatch
File
- core/
lib/ Drupal/ Core/ Routing/ UrlMatcher.php, line 40 - Contains \Drupal\Core\Routing\UrlMatcher.
Class
- UrlMatcher
- Drupal-specific URL Matcher; handles the Drupal "system path" mapping.
Namespace
Drupal\Core\RoutingCode
public function finalMatch(RouteCollection $collection, Request $request) {
$this->routes = $collection;
$context = new RequestContext();
$context
->fromRequest($request);
$this
->setContext($context);
return $this
->match($this->currentPath
->getPath($request));
}