class ApacheUrlMatcher extends UrlMatcher

deprecated since version 2.5, to be removed in 3.0. The performance gains are minimal and it's very hard to replicate the behavior of PHP implementation.

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.

setContext(RequestContext $context)

Sets the request context.

getContext()

Gets the request context.

array
match(string $pathinfo)

Tries to match a URL based on Apache mod_rewrite matching.

array
matchRequest(Request $request)

Tries to match a request with a set of routes.

Details

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

Constructor.

Parameters

RouteCollection $routes A RouteCollection instance
RequestContext $context The context

in UrlMatcher at line line 72
setContext(RequestContext $context)

Sets the request context.

Parameters

RequestContext $context The context

in UrlMatcher at line line 80
RequestContext getContext()

Gets the request context.

Return Value

RequestContext The context

at line line 41
array match(string $pathinfo)

Tries to match a URL based on Apache mod_rewrite matching.

Returns false if no route matches the URL.

Parameters

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

Return Value

array An array of parameters

Exceptions

MethodNotAllowedException If the current method is not allowed

in UrlMatcher at line line 104
array matchRequest(Request $request)

Tries to match a request with a set of routes.

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

Parameters

Request $request The request to match

Return Value

array An array of parameters

Exceptions

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

in UrlMatcher at line line 115
addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)