Segment route.

package Default

 Methods

Create a new regex route.

__construct(string $route, array $constraints = array(), array $defaults = array()

Parameters

$route

string

$constraints

array

$defaults

array

assemble(): Defined by RouteInterface interface.

assemble(array $params = array(), array $options = array()) : mixed
see

Parameters

$params

array

$options

array

Returns

mixed

factory(): defined by RouteInterface interface.

factory(array|\Traversable $options = array()) : \Zend\Mvc\Router\Http\Segment
Static
see

Parameters

$options

array\Traversable

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException

Returns

\Zend\Mvc\Router\Http\Segment

getAssembledParams(): defined by RouteInterface interface.

getAssembledParams() : array
see
inherited_from \Zend\Mvc\Router\Http\RouteInterface::getAssembledParams()

Returns

array

match(): defined by RouteInterface interface.

match(\Zend\Stdlib\RequestInterface $request, string|null $pathOffset = null, array $options = array()) : \Zend\Mvc\Router\Http\RouteMatch | null
see

Parameters

$request

\Zend\Stdlib\RequestInterface

$pathOffset

stringnull

$options

array

Exceptions

\Zend\Mvc\Router\Exception\RuntimeException

Returns

\Zend\Mvc\Router\Http\RouteMatchnull

Build a path.

buildPath(array $parts, array $mergedParams, boolean $isOptional, boolean $hasChild, array $options) : string

Parameters

$parts

array

$mergedParams

array

$isOptional

boolean

$hasChild

boolean

$options

array

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException
\Zend\Mvc\Router\Exception\RuntimeException

Returns

string

Build the matching regex from parsed parts.

buildRegex(array $parts, array $constraints, integer $groupIndex = 1) : string

Parameters

$parts

array

$constraints

array

$groupIndex

integer

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

\Zend\Mvc\Router\Exception\RuntimeException

Returns

array

 Properties

 

List of assembled parameters.

$assembledParams : array

Default

array()
 

Cache for the encode output.

$cacheEncode : array

Default

array()
Static
 

Default values.

$defaults : array

Default

 

Map from regex groups to parameter names.

$paramMap : array

Default

array()
 

Parts of the route.

$parts : array

Default

 

Regex used for matching the route.

$regex : string

Default

 

Translation keys used in the regex.

$translationKeys : array

Default

array()
 

Map of allowed special chars in path segments.

$urlencodeCorrectionMap : array

Default

array('%21' => "!", '%24' => "$", '%26' => "&", '%27' => "'", '%28' => "(", '%29' => ")", '%2A' => "*", '%2B' => "+", '%2C' => ",", '%3A' => ":", '%3B' => ";", '%3D' => "=", '%40' => "@")
Static

http://tools.ietf.org/html/rfc3986#appendix-A segement = pchar pchar = unreserved / pct-encoded / sub-delims / ":" / "@" unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "" / "+" / "," / ";" / "="