Documentation

ProjectUrlMatcher extends RedirectableUrlMatcher
in package

This class has been auto-generated by the Symfony Routing Component.

Table of Contents

REQUIREMENT_MATCH  = 0
REQUIREMENT_MISMATCH  = 1
ROUTE_MATCH  = 2
$allow  : mixed
$context  : mixed
$expressionLanguage  : mixed
$expressionLanguageProviders  : array<string|int, ExpressionFunctionProviderInterface>
$request  : mixed
$routes  : mixed
__construct()  : mixed
addExpressionLanguageProvider()  : mixed
getContext()  : mixed
{@inheritdoc}
match()  : mixed
matchRequest()  : array<string|int, mixed>
Tries to match a request with a set of routes.
redirect()  : array<string|int, mixed>
Redirects the user to another URL.
setContext()  : mixed
{@inheritdoc}
getAttributes()  : array<string|int, mixed>
Returns an array of values to use as request attributes.
getExpressionLanguage()  : mixed
handleRouteRequirements()  : array<string|int, mixed>
Handles specific route requirements.
matchCollection()  : array<string|int, mixed>
Tries to match a URL with a set of routes.
mergeDefaults()  : array<string|int, mixed>
Get merged default parameters.

Constants

REQUIREMENT_MATCH

public mixed REQUIREMENT_MATCH = 0

REQUIREMENT_MISMATCH

public mixed REQUIREMENT_MISMATCH = 1

Properties

$expressionLanguage

protected mixed $expressionLanguage

$expressionLanguageProviders

protected array<string|int, ExpressionFunctionProviderInterface> $expressionLanguageProviders = []

Methods

addExpressionLanguageProvider()

public addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) : mixed
Parameters
$provider : ExpressionFunctionProviderInterface
Return values
mixed

getContext()

{@inheritdoc}

public getContext() : mixed
Return values
mixed

match()

public match(mixed $rawPathinfo) : mixed
Parameters
$rawPathinfo : mixed
Return values
mixed

matchRequest()

Tries to match a request with a set of routes.

public matchRequest(Request $request) : array<string|int, mixed>
Parameters
$request : Request
Return values
array<string|int, mixed>

An array of parameters

redirect()

Redirects the user to another URL.

public redirect(mixed $path, mixed $route[, mixed $scheme = null ]) : array<string|int, mixed>
Parameters
$path : mixed

The path info to redirect to

$route : mixed

The route name that matched

$scheme : mixed = null

The URL scheme (null to keep the current one)

Return values
array<string|int, mixed>

An array of parameters

getAttributes()

Returns an array of values to use as request attributes.

protected getAttributes(Route $route, string $name, array<string|int, mixed> $attributes) : array<string|int, mixed>

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).

Parameters
$route : Route

The route we are matching against

$name : string

The name of the route

$attributes : array<string|int, mixed>

An array of attributes from the matcher

Return values
array<string|int, mixed>

An array of parameters

getExpressionLanguage()

protected getExpressionLanguage() : mixed
Return values
mixed

handleRouteRequirements()

Handles specific route requirements.

protected handleRouteRequirements(string $pathinfo, string $name, Route $route) : array<string|int, mixed>
Parameters
$pathinfo : string

The path

$name : string

The route name

$route : Route

The route

Return values
array<string|int, mixed>

The first element represents the status, the second contains additional information

matchCollection()

Tries to match a URL with a set of routes.

protected matchCollection(string $pathinfo, RouteCollection $routes) : array<string|int, mixed>
Parameters
$pathinfo : string

The path info to be parsed

$routes : RouteCollection

The set of routes

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>

An array of parameters

mergeDefaults()

Get merged default parameters.

protected mergeDefaults(array<string|int, mixed> $params, array<string|int, mixed> $defaults) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

The parameters

$defaults : array<string|int, mixed>

The defaults

Return values
array<string|int, mixed>

Merged default parameters

Search results