Drupal investigation

RequestMatcherInterface.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Routing\Matcher;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\Component\Routing\Exception\ResourceNotFoundException;
  13. use Symfony\Component\Routing\Exception\MethodNotAllowedException;
  14. /**
  15. * RequestMatcherInterface is the interface that all request matcher classes must implement.
  16. *
  17. * @author Fabien Potencier <fabien@symfony.com>
  18. */
  19. interface RequestMatcherInterface
  20. {
  21. /**
  22. * Tries to match a request with a set of routes.
  23. *
  24. * If the matcher can not find information, it must throw one of the exceptions documented
  25. * below.
  26. *
  27. * @param Request $request The request to match
  28. *
  29. * @return array An array of parameters
  30. *
  31. * @throws ResourceNotFoundException If no matching resource could be found
  32. * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed
  33. */
  34. public function matchRequest(Request $request);
  35. }