public function UrlMatcher::match

Tries to match a URL path with a set of routes.

If the matcher can not find information, it must throw one of the exceptions documented below.

@api

Parameters

string $pathinfo The path info to be parsed (raw format, i.e. not urldecoded):

Return value

array An array of parameters

Throws

ResourceNotFoundException If the resource could not be found

MethodNotAllowedException If the resource was found but the request method is not allowed

Overrides UrlMatcherInterface::match

5 calls to UrlMatcher::match()
5 methods override UrlMatcher::match()

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php, line 81

Class

UrlMatcher
UrlMatcher matches URL based on a set of routes.

Namespace

Symfony\Component\Routing\Matcher

Code

public function match($pathinfo) {
  $this->allow = array();
  if ($ret = $this
    ->matchCollection(rawurldecode($pathinfo), $this->routes)) {
    return $ret;
  }
  throw 0 < count($this->allow) ? new MethodNotAllowedException(array_unique(array_map('strtoupper', $this->allow))) : new ResourceNotFoundException();
}