4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Routing\Matcher
;
14 use Symfony\Component\HttpFoundation\Request
;
15 use Symfony\Component\Routing\Exception\ResourceNotFoundException
;
16 use Symfony\Component\Routing\Exception\MethodNotAllowedException
;
19 * RequestMatcherInterface is the interface that all request matcher classes must implement.
21 * @author Fabien Potencier <fabien@symfony.com>
23 interface RequestMatcherInterface
26 * Tries to match a request with a set of routes.
28 * If the matcher can not find information, it must throw one of the exceptions documented
31 * @param Request $request The request to match
33 * @return array An array of parameters
35 * @throws ResourceNotFoundException If no matching resource could be found
36 * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed
38 public function matchRequest(Request
$request);