Matches a request against a route collection and returns exactly one result.
RouteCollection $collection The collection against which to match.:
Request $request The request to match.:
array An array of parameters
ResourceNotFoundException if none of the routes in $collection matches $request
Overrides FinalMatcherInterface::finalMatch
public function finalMatch(RouteCollection $collection, Request $request) {
$this->routes = $collection;
$context = new RequestContext();
$context
->fromRequest($request);
$this
->setContext($context);
return $this
->match($request
->getPathInfo());
}