TraceableUrlMatcher
class TraceableUrlMatcher extends UrlMatcher
TraceableUrlMatcher helps debug path info matching by tracing the match.
Constants
REQUIREMENT_MATCH | |
REQUIREMENT_MISMATCH | |
ROUTE_MATCH | |
ROUTE_DOES_NOT_MATCH | |
ROUTE_ALMOST_MATCHES | |
ROUTE_MATCHES |
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. | from UrlMatcher |
array | matchRequest(Request $request) Tries to match a request with a set of routes. | from UrlMatcher |
addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) | from UrlMatcher | |
getTraces($pathinfo) | ||
getTracesForRequest(Request $request) |
Details
__construct(RouteCollection $routes, RequestContext $context)
Constructor.
Parameters
RouteCollection | $routes | A RouteCollection instance |
RequestContext | $context | The context |
setContext(RequestContext $context)
Sets the request context.
Parameters
RequestContext | $context | The context |
RequestContext getContext()
Gets the request context.
Return Value
RequestContext | The context |
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 path info to be parsed (raw format, i.e. not urldecoded) |
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 |
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 |
addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
Parameters
ExpressionFunctionProviderInterface | $provider |
getTraces($pathinfo)
Parameters
$pathinfo |
getTracesForRequest(Request $request)
Parameters
Request | $request |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.html