|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Parses route strings of the following form: More...
Inheritance diagram for FastRoute\RouteParser\Std:
Collaboration diagram for FastRoute\RouteParser\Std:Public Member Functions | |
| parse ($route) | |
| Parses a route string into multiple route data arrays. More... | |
| parse ($route) | |
| Parses a route string into multiple route data arrays. More... | |
Data Fields | |
| const | VARIABLE_REGEX = |
| const | DEFAULT_DISPATCH_REGEX = '[^/]+' |
Private Member Functions | |
| parsePlaceholders ($route) | |
| Parses a route string that does not contain optional segments. More... | |
Parses route strings of the following form:
"/user/{name}[/{id:[0-9]+}]"
| FastRoute\RouteParser\Std::parse | ( | $route | ) |
Parses a route string into multiple route data arrays.
The expected output is defined using an example:
For the route string "/fixedRoutePart/{varName}[/moreFixed/{varName2:\d+}]", if {varName} is interpreted as a placeholder and [...] is interpreted as an optional route part, the expected result is:
[ // first route: without optional part [ "/fixedRoutePart/", ["varName", "[^/]+"], ], // second route: with optional part [ "/fixedRoutePart/", ["varName", "[^/]+"], "/moreFixed/", ["varName2", [0-9]+"], ], ]
Here one route string was converted into two route data arrays.
| string | $route | Route string to parse |
Implements FastRoute\RouteParser.
Definition at line 25 of file Std.php.
References $n, and FastRoute\RouteParser\Std\parsePlaceholders().
Here is the call graph for this function:
|
private |
Parses a route string that does not contain optional segments.
| string |
Definition at line 59 of file Std.php.
References FastRoute\RouteParser\Std\DEFAULT_DISPATCH_REGEX.
Referenced by FastRoute\RouteParser\Std\parse().
Here is the caller graph for this function:| const FastRoute\RouteParser\Std::DEFAULT_DISPATCH_REGEX = '[^/]+' |
Definition at line 23 of file Std.php.
Referenced by FastRoute\RouteParser\Std\parsePlaceholders().