UrlMatcher
class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface
UrlMatcher matches URL based on a set of routes.
Constants
REQUIREMENT_MATCH |
|
REQUIREMENT_MISMATCH |
|
ROUTE_MATCH |
|
Properties
protected | $context | ||
protected | $allow | Collects HTTP methods that would be allowed for the request. | |
protected | $allowSchemes | Collects URI schemes that would be allowed for the request. | |
protected | $routes | ||
protected | $request | ||
protected | $expressionLanguage | ||
protected ExpressionFunctionProviderInterface[] | $expressionLanguageProviders |
Methods
Gets the request context.
Tries to match a URL path with a set of routes.
Tries to match a URL with a set of routes.
Returns an array of values to use as request attributes.
Handles specific route requirements.
Get merged default parameters.
No description
No description
Details
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.
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.
protected array
matchCollection(string $pathinfo, RouteCollection $routes)
Tries to match a URL with a set of routes.
protected array
getAttributes(Route $route, string $name, array $attributes)
Returns an array of values to use as request attributes.
As this method requires the Route object, it is not available in matchers that do not have access to the matched Route instance (like the PHP and Apache matcher dumpers).
protected array
handleRouteRequirements(string $pathinfo, string $name, Route $route)
Handles specific route requirements.