Router
in package
Read onlyYes
FinalYes
Table of Contents
Methods
- getRouteFromPath() : Route|RoutingParamIssue|RouteNotFoundIssue
- getRouteFromSegs() : Route|RoutingParamIssue|RouteNotFoundIssue
- getSegs() : array<int, string>
- Convert an ABSOLUTE path to a list of path segments, CONVERTS "/" to "".
Methods
getRouteFromPath()
public
getRouteFromPath(RouteDef $rootRouteDef, string $path) : Route|RoutingParamIssue|RouteNotFoundIssue
Parameters
- $rootRouteDef : RouteDef
- $path : string
-
An arbitrary string made of segments separated by one or more forward slashes.
Return values
Route|RoutingParamIssue|RouteNotFoundIssuegetRouteFromSegs()
public
getRouteFromSegs(RouteDef $routeDef, Route|null $parentRoute, string $currentSeg, array<int, string> $nextSegs) : Route|RoutingParamIssue|RouteNotFoundIssue
Parameters
Tags
Return values
Route|RoutingParamIssue|RouteNotFoundIssuegetSegs()
Convert an ABSOLUTE path to a list of path segments, CONVERTS "/" to "".
public
getSegs(string $absPath) : array<int, string>
A "path segment" is defined in the context of LMWF as the URL-decoded part of each path segment of the given absolute path.
Parameters
- $absPath : string
-
An ABSOLUTE, valid HTTP path.