Segment route.
Methods
Create a new regex route.
__construct(string $route, array $constraints, array $defaults)
Parameters
$route
string
$constraints
array
$defaults
array
assemble(): Defined by RouteInterface interface.
assemble(array $params, array $options) : mixed
see |
\Zend\Mvc\Router\RouteInterface::assemble() |
Parameters
$params
array
$options
array
Returns
mixed
factory(): defined by RouteInterface interface.
factory(array | \Traversable $options) : \Zend\Mvc\Router\Http\Segment
see |
\Zend\Mvc\Router\RouteInterface::factory() |
Parameters
$options
array\Traversable
Exceptions
Returns
getAssembledParams(): defined by RouteInterface interface.
getAssembledParams() : array
see |
\Zend\Mvc\Router\Http\RouteInterface::getAssembledParams |
Returns
array
match(): defined by RouteInterface interface.
match(\Zend\Stdlib\RequestInterface $request, string | null $pathOffset, array $options) : \Zend\Mvc\Router\Http\RouteMatch | null
see |
\Zend\Mvc\Router\RouteInterface::match() |
Parameters
$pathOffset
stringnull
$options
array
Exceptions
Returns
Build a path.
buildPath(array $parts, array $mergedParams, bool $isOptional, bool $hasChild, array $options) : string
Parameters
$parts
array
$mergedParams
array
$isOptional
bool
$hasChild
bool
$options
array
Exceptions
Returns
string
Build the matching regex from parsed parts.
buildRegex(array $parts, array $constraints, int $groupIndex) : string
Parameters
$parts
array
$constraints
array
$groupIndex
int
Returns
string
Decode a path segment.
decode(string $value) : string
Parameters
$value
string
Returns
string
Encode a path segment.
encode(string $value) : string
Parameters
$value
string
Returns
string
Parse a route definition.
parseRouteDefinition(string $def) : array
Parameters
$def
string
Exceptions
Returns
array
Properties
List of assembled parameters.
$assembledParams : array
Cache for the encode output.
$cacheEncode : array
Default values.
$defaults : array
Map from regex groups to parameter names.
$paramMap : array
Parts of the route.
$parts : array
Regex used for matching the route.
$regex : string
Translation keys used in the regex.
$translationKeys : array
Map of allowed special chars in path segments.
$urlencodeCorrectionMap : array
http://tools.ietf.org/html/rfc3986#appendix-A
segement = pchar
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "" / "+" / "," / ";" / "="