Keine Beschreibung

UrlMatcherInterface.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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($pathinfo);
  37. }