Documentation

UrlParserBase

Trait UrlParserBase

Tags
author

Dodonov A.A.

version

v.1.0 (2021/09/27)

copyright

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

Table of Contents

$parameters  : array<string|int, mixed>
Parsed parameters of the calling router
getParam()  : mixed
Method returns route parameter
hasParam()  : bool
Does parameter exists
executeHandler()  : mixed
Method executes route handler
getDynamicRouteProcessor()  : mixed
Method searches dynamic route processor
getParameters()  : array<string|int, mixed>
Method returns parameters
setParameters()  : void
Method sets parameters
methodDoesNotExists()  : bool
Checking that method exists

Properties

$parameters

Parsed parameters of the calling router

protected array<string|int, mixed> $parameters = []

Methods

getParam()

Method returns route parameter

public getParam(string $name) : mixed
Parameters
$name : string

route parameter

Return values
mixed

route parameter

hasParam()

Does parameter exists

public hasParam(string $name) : bool
Parameters
$name : string

param name

Return values
bool

true if the parameter exists

executeHandler()

Method executes route handler

protected executeHandler(mixed $processor, string $route) : mixed
Parameters
$processor : mixed
$route : string

route

Tags
psalm-param

callable|string|array{0: string, 1: string} $processor

Return values
mixed

route handler execution result

getDynamicRouteProcessor()

Method searches dynamic route processor

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

route

$requestMethod : string = ''

request method

Return values
mixed

getParameters()

Method returns parameters

protected getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

setParameters()

Method sets parameters

protected setParameters(array<string|int, mixed> $parameters) : void
Parameters
$parameters : array<string|int, mixed>

parameters

Return values
void

methodDoesNotExists()

Checking that method exists

private methodDoesNotExists(mixed $processor, string|null $functionName) : bool
Parameters
$processor : mixed

callback object

$functionName : string|null

callback method

Return values
bool

true if method does not exists

Search results