Symfony2 API
Class

Symfony\Component\Routing\Matcher\ApacheUrlMatcher

class ApacheUrlMatcher extends UrlMatcher

ApacheUrlMatcher matches URL based on Apache mod_rewrite matching (see ApacheMatcherDumper).

Constants

REQUIREMENT_MATCH

REQUIREMENT_MISMATCH

ROUTE_MATCH

Methods

__construct(RouteCollection $routes, RequestContext $context)

Constructor.

from UrlMatcher
setContext(RequestContext $context)

Sets the request context.

from UrlMatcher
RequestContext getContext()

Gets the request context.

from UrlMatcher
array match(string $pathinfo)

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

Details

in UrlMatcher at line 56
public __construct(RouteCollection $routes, RequestContext $context)

Constructor.

Parameters

RouteCollection $routes A RouteCollection instance
RequestContext $context The context

in UrlMatcher at line 65
public setContext(RequestContext $context)

Sets the request context.

Parameters

RequestContext $context The context

in UrlMatcher at line 73
public RequestContext getContext()

Gets the request context.

Return Value

RequestContext The context

at line 35
public array match(string $pathinfo)

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 pathinfo to be parsed

Return Value

array An array of parameters

Exceptions

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