Documentation

SimpleRoutesSet

Trait SimpleRoutesSet

Tags
author

Dodonov A.A.

version

v.1.0 (2021/09/27)

copyright

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

Table of Contents

dumpOnDisk()  : void
Method dumps all routes and their names on disk
loadFromDisk()  : void
Method loads routes from disk
addParamRoute()  : void
Method adds param router
getAllRoutesTrace()  : string
Method rturns all available routes
paramRouteExists()  : bool
Method returns true if the param router exists

Methods

dumpOnDisk()

Method dumps all routes and their names on disk

public dumpOnDisk([string $filePath = './cache/cache.php' ]) : void
Parameters
$filePath : string = './cache/cache.php'

file path to cache

Tags
codeCoverageIgnore
Return values
void

loadFromDisk()

Method loads routes from disk

public loadFromDisk([string $filePath = './cache/cache.php' ]) : void
Parameters
$filePath : string = './cache/cache.php'

file path to cache

Tags
codeCoverageIgnore
psalm-suppress

UnresolvableInclude, MixedArrayAccess, MixedAssignment

Return values
void

addParamRoute()

Method adds param router

protected addParamRoute(string $requestMethod, string $route, mixed $callback) : void
Parameters
$requestMethod : string

request method

$route : string

route

$callback : mixed
Return values
void

getAllRoutesTrace()

Method rturns all available routes

protected getAllRoutesTrace() : string
Tags
psalm-suppress

PossiblyUndefinedArrayOffset

Return values
string

trace

paramRouteExists()

Method returns true if the param router exists

protected paramRouteExists(string $route, string $requestMethod) : bool
Parameters
$route : string

checking route

$requestMethod : string

HTTP request method

Tags
psalm-suppress

PossiblyUndefinedArrayOffset

Return values
bool

true if the param router exists, false otherwise

Search results

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