Properties

$staticRoutes

$staticRoutes : array<mixed,mixed[]>

Type

array<mixed,mixed[]>

$methodToRegexToRoutesMap

$methodToRegexToRoutesMap : array<mixed,\FastRoute\Route[]>

Type

array<mixed,\FastRoute\Route[]>

Methods

addRoute()

addRoute(string  $httpMethod, array  $routeData, mixed  $handler) 

Adds a route to the data generator. The route data uses the same format that is returned by RouterParser::parser().

The handler doesn't necessarily need to be a callable, it can be arbitrary data that will be returned when the route matches.

Parameters

string $httpMethod
array $routeData
mixed $handler

getData()

getData() : array<mixed,mixed>

Returns dispatcher data in some unspecified format, which depends on the used method of dispatch.

Returns

array<mixed,mixed>

getApproxChunkSize()

getApproxChunkSize() : integer

Returns

integer

processChunk()

processChunk(  $regexToRoutesMap) : array<mixed,mixed>

Parameters

$regexToRoutesMap

Returns

array<mixed,mixed>

generateVariableRouteData()

generateVariableRouteData() : array<mixed,mixed>

Returns

array<mixed,mixed>

computeChunkSize()

computeChunkSize(  $count) : integer

Parameters

$count

Returns

integer

isStaticRoute()

isStaticRoute(  $routeData) : boolean

Parameters

$routeData

Returns

boolean

addStaticRoute()

addStaticRoute(  $httpMethod,   $routeData,   $handler) 

Parameters

$httpMethod
$routeData
$handler

addVariableRoute()

addVariableRoute(  $httpMethod,   $routeData,   $handler) 

Parameters

$httpMethod
$routeData
$handler

buildRegexForRoute()

buildRegexForRoute(  $routeData) : array<mixed,mixed>

Parameters

$routeData

Returns

array<mixed,mixed>

regexHasCapturingGroups()

regexHasCapturingGroups(  $regex) : boolean

Parameters

$regex

Returns

boolean