Router
in package
Read onlyYes
FinalYes
Table of Contents
Methods
- getRouteFromPath() : Route|RoutingParamIssue|RouteNotFoundIssue
- getRouteFromSegs() : Route|RoutingParamIssue|RouteNotFoundIssue
- splitPathInSegs() : array<int, string>
- Convert an ABSOLUTE path to a list of path segments, CONVERTS "/" to "".
Methods
getRouteFromPath()
public
getRouteFromPath(RouteDef $rootRouteDef, string $absPath) : Route|RoutingParamIssue|RouteNotFoundIssue
Parameters
- $rootRouteDef : RouteDef
- $absPath : string
-
An absolute, URL-decoded HTTP path. Must begin with a forward slash, unless it is empty.
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|RouteNotFoundIssuesplitPathInSegs()
Convert an ABSOLUTE path to a list of path segments, CONVERTS "/" to "".
public
splitPathInSegs(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. It must begin with a slash, except for the empty string. If it only contains a slash, it is converted into an empty string.
Parameters
- $absPath : string
-
An ABSOLUTE, valid HTTP path.