You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.4 KiB

3 years ago
  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\Routing\Exception\MethodNotAllowedException;
  12. use Symfony\Component\Routing\Exception\NoConfigurationException;
  13. use Symfony\Component\Routing\Exception\ResourceNotFoundException;
  14. use Symfony\Component\Routing\RequestContextAwareInterface;
  15. /**
  16. * UrlMatcherInterface is the interface that all URL matcher classes must implement.
  17. *
  18. * @author Fabien Potencier <fabien@symfony.com>
  19. */
  20. interface UrlMatcherInterface extends RequestContextAwareInterface
  21. {
  22. /**
  23. * Tries to match a URL path 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. * @param string $pathinfo The path info to be parsed (raw format, i.e. not urldecoded)
  29. *
  30. * @return array An array of parameters
  31. *
  32. * @throws NoConfigurationException If no routing configuration could be found
  33. * @throws ResourceNotFoundException If the resource could not be found
  34. * @throws MethodNotAllowedException If the resource was found but the request method is not allowed
  35. */
  36. public function match(string $pathinfo);
  37. }