074b3e0d5db34b06d11a36b430f7f8b7d26e9778
[yaffs-website] / vendor / symfony-cmf / routing / NestedMatcher / FinalMatcherInterface.php
1 <?php
2
3 /*
4  * This file is part of the Symfony CMF package.
5  *
6  * (c) 2011-2015 Symfony CMF
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Cmf\Component\Routing\NestedMatcher;
13
14 use Symfony\Component\HttpFoundation\Request;
15 use Symfony\Component\Routing\RouteCollection;
16 use Symfony\Component\Routing\Exception\ResourceNotFoundException;
17
18 /**
19  * A FinalMatcher returns only one route from a collection of candidate routes.
20  *
21  * @author Larry Garfield
22  * @author David Buchmann
23  */
24 interface FinalMatcherInterface
25 {
26     /**
27      * Matches a request against a route collection and returns exactly one result.
28      *
29      * @param RouteCollection $collection The collection against which to match.
30      * @param Request         $request    The request to match.
31      *
32      * @return array An array of parameters
33      *
34      * @throws ResourceNotFoundException if none of the routes in $collection
35      *                                   matches $request
36      */
37     public function finalMatch(RouteCollection $collection, Request $request);
38 }