Documentation

UrlMatcherInterface extends RequestContextAwareInterface

UrlMatcherInterface is the interface that all URL matcher classes must implement.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

getContext()  : RequestContext
Gets the request context.
match()  : array<string|int, mixed>
Tries to match a URL path with a set of routes.
setContext()  : mixed
Sets the request context.

Methods

match()

Tries to match a URL path with a set of routes.

public match(string $pathinfo) : array<string|int, mixed>

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

Parameters
$pathinfo : string

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

Tags
throws
NoConfigurationException

If no routing configuration could be found

throws
ResourceNotFoundException

If the resource could not be found

throws
MethodNotAllowedException

If the resource was found but the request method is not allowed

Return values
array<string|int, mixed>

Search results