Documentation

UrlParser

Trait UrlParser

Tags
author

Dodonov A.A.

version

v.1.0 (2021/09/27)

copyright

Copyright (c) 2021, http://aeon.su

Table of Contents

$cachedParameters  : array<string, array<string|int, string>>
Cached parameters for route
$cachedRegExps  : array<string|int, string>
Cache for regular expressions
warmCache()  : void
Method warms cache
getDynamicRouteProcessor()  : mixed
Method searches dynamic route processor
_getParameterNames()  : array<string|int, string>
Method returns all parameter names in the route
_getRouteMatcherRegExPattern()  : string
Method compiles route pattern string in regex string.

Properties

$cachedParameters

Cached parameters for route

private array<string, array<string|int, string>> $cachedParameters = []

$cachedRegExps

Cache for regular expressions

private array<string|int, string> $cachedRegExps = []

Methods

warmCache()

Method warms cache

public warmCache() : void
Return values
void

getDynamicRouteProcessor()

Method searches dynamic route processor

protected getDynamicRouteProcessor(string $route[, string $requestMethod = '' ]) : mixed
Parameters
$route : string

route

$requestMethod : string = ''

request method

Return values
mixed

_getParameterNames()

Method returns all parameter names in the route

private _getParameterNames(string $routerPattern) : array<string|int, string>
Parameters
$routerPattern : string

route

Return values
array<string|int, string>

names

_getRouteMatcherRegExPattern()

Method compiles route pattern string in regex string.

private _getRouteMatcherRegExPattern(string $routerPattern) : string

For example [i:id]/some-str in ([[0-9]])/some-str

Parameters
$routerPattern : string

router pattern

Tags
psalm-suppress

MixedMethodCall

Return values
string

regexp pattern

Search results

    Яндекс.Метрика