UrlMatcher::getContext()

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

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.

UrlMatcher::matchRequest()

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

UrlMatcher::addExpressionLanguageProvider()

addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) Parameters ExpressionFunctionProviderInterface $provider

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

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::getContext()

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

UrlGenerator::generate()

string generate(string $name, mixed $parameters = array(), int $referenceType = self::ABSOLUTE_PATH) Generates a URL or path for a specific route based on the given parameters. Parameters that reference placeholders in the route pattern will substitute them in the path or host. Extra params are added as query string to the URL. When the passed reference type cannot be generated for the route because it requires a different host or scheme than the current one, the method will retu

UrlGenerator

class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInterface UrlGenerator can generate a URL or a path for any route in the RouteCollection based on the passed parameters. Methods __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null) Constructor. setContext(RequestContext $context) Sets the request context. RequestContext getContext() Gets the request context. setStrictRequirements(bool|null $enabled) Enable