PageUriMatcher

Internal class, which is similar to Symfony's Urlmatcher but without validating - conditions / expression language - host matches - method checks because this method only works in conjunction with PageRouter.

Internal

Table of Contents

Properties

$mappableProcessor  : MappableProcessor
$routes  : RouteCollection<string, Route>

Methods

__construct()  : mixed
match()  : array<string|int, mixed>
Matches a path segment against the route collection
getAttributes()  : array<string|int, mixed>
Returns an array of values to use as request attributes.
getDecoratedRoutePath()  : string|null
Resolves an optional route specific decorated route path that has been assigned by DecoratingEnhancerInterface instances.
matchCollection()  : array<string|int, mixed>
Tries to match a URL with a set of routes.
mergeDefaults()  : array<string|int, mixed>
Get merged default parameters.

Properties

Methods

match()

Matches a path segment against the route collection

public match(string $urlPath) : array<string|int, mixed>
Parameters
$urlPath : string
Tags
throws
ResourceNotFoundException
Return values
array<string|int, mixed>

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

getDecoratedRoutePath()

Resolves an optional route specific decorated route path that has been assigned by DecoratingEnhancerInterface instances.

protected getDecoratedRoutePath(Route $route) : string|null
Parameters
$route : Route
Return values
string|null

matchCollection()

Tries to match a URL with a set of routes.

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

The path info to be parsed

$routes : RouteCollection<string, Route>

The set of routes

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


        
On this page

Search results