Sen descrición

RequestMatcherInterface.php 1.3KB

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\MethodNotAllowedException;
  13. use Symfony\Component\Routing\Exception\NoConfigurationException;
  14. use Symfony\Component\Routing\Exception\ResourceNotFoundException;
  15. /**
  16. * RequestMatcherInterface is the interface that all request matcher classes must implement.
  17. *
  18. * @author Fabien Potencier <fabien@symfony.com>
  19. */
  20. interface RequestMatcherInterface
  21. {
  22. /**
  23. * Tries to match a request with a set of routes.
  24. *
  25. * If the matcher can not find information, it must throw one of the exceptions documented
  26. * below.
  27. *
  28. * @return array An array of parameters
  29. *
  30. * @throws NoConfigurationException If no routing configuration could be found
  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. }