RouteParser
class RouteParser
Parses route strings:
"/user/{name}[/{id:[0-9]+}]"
Constants
VARIABLE_REGEX |
|
DEFAULT_DISPATCH_REGEX |
|
Methods
static array
parse(string $routePattern)
Parse route pattern
static array
parsePlaceholders(string $route)
Parses a route string that does not contain optional segments.
static string
createRegex(array|string $routeData)
Create route regex
static array
buildRegexForRoute(array $routeData)
Create route regex
static bool
regexHasCapturingGroups(string $regex)
Test for capturing groups
static bool
isStaticRoute(array $routeData)
Return true if route is static
Details
at line 39
static array
parse(string $routePattern)
Parse route pattern
at line 72
static array
parsePlaceholders(string $route)
Parses a route string that does not contain optional segments.
at line 107
static string
createRegex(array|string $routeData)
Create route regex
at line 124
static array
buildRegexForRoute(array $routeData)
Create route regex
at line 156
static bool
regexHasCapturingGroups(string $regex)
Test for capturing groups
at line 185
static bool
isStaticRoute(array $routeData)
Return true if route is static