4 * This file is part of the Symfony CMF package.
6 * (c) 2011-2015 Symfony CMF
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Cmf\Component\Routing\NestedMatcher;
14 use Symfony\Component\HttpFoundation\Request;
15 use Symfony\Component\Routing\RouteCollection;
16 use Symfony\Component\Routing\Exception\ResourceNotFoundException;
19 * A FinalMatcher returns only one route from a collection of candidate routes.
21 * @author Larry Garfield
22 * @author David Buchmann
24 interface FinalMatcherInterface
27 * Matches a request against a route collection and returns exactly one result.
29 * @param RouteCollection $collection The collection against which to match.
30 * @param Request $request The request to match.
32 * @return array An array of parameters
34 * @throws ResourceNotFoundException if none of the routes in $collection
37 public function finalMatch(RouteCollection $collection, Request $request);