UrlMatcher::match()

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

UrlMatcher::getContext()

RequestContext getContext() Gets the request context. Return Value RequestContext The context

UrlMatcher::addExpressionLanguageProvider()

addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) Parameters ExpressionFunctionProviderInterface $provider

UrlMatcher

class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface UrlMatcher matches URL based on a set of routes. Constants REQUIREMENT_MATCH REQUIREMENT_MISMATCH ROUTE_MATCH Methods __construct(RouteCollection $routes, RequestContext $context) Constructor. setContext(RequestContext $context) Sets the request context. RequestContext getContext() Gets the request context. array match(string $pathinfo) Tries to match a URL path with a set of routes.

UrlGeneratorInterface

interface UrlGeneratorInterface implements RequestContextAwareInterface UrlGeneratorInterface is the interface that all URL generator classes must implement. The constants in this interface define the different types of resource references that are declared in RFC 3986: http://tools.ietf.org/html/rfc3986 We are using the term "URL" instead of "URI" as this is more common in web applications and we do not need to distinguish them as the difference is mostly semantical and less technical. Gene

UrlGenerator::setStrictRequirements()

setStrictRequirements(bool|null $enabled) Enables or disables the exception on incorrect parameters. Passing null will deactivate the requirements check completely. Parameters bool|null $enabled

UrlGenerator::setContext()

setContext(RequestContext $context) Sets the request context. Parameters RequestContext $context The context

UrlGenerator::isStrictRequirements()

bool|null isStrictRequirements() Returns whether to throw an exception on incorrect parameters. Null means the requirements check is deactivated completely. Return Value bool|null

UrlGenerator::getRelativePath()

static string getRelativePath(string $basePath, string $targetPath) Returns the target path as relative reference from the base path. Only the URIs path component (no schema, host etc.) is relevant and must be given, starting with a slash. Both paths must be absolute and not contain relative parts. Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. Furthermore, they can be used to reduce the link size in

UrlGenerator::getContext()

RequestContext getContext() Gets the request context. Return Value RequestContext The context