You are here

public function Router::match in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Router.php \Symfony\Component\Routing\Router::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.

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

File

vendor/symfony/routing/Router.php, line 240

Class

Router
The Router class is an example of the integration of all pieces of the routing system for easier use.

Namespace

Symfony\Component\Routing

Code

public function match($pathinfo) {
  return $this
    ->getMatcher()
    ->match($pathinfo);
}