Segment route.

package Zend_Mvc_Router
subpackage Http
see \Zend\Mvc\Router\Http\http://guides.rubyonrails.org/routing.html

 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\Http\Route::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\Http\Route::factory()

Parameters

$options

array\Traversable

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException

Returns

getAssembledParams(): defined by RouteInterface interface.

getAssembledParams() : array

see \Zend\Mvc\Router\Http\Route::getAssembledParams

Returns

array

match(): defined by RouteInterface interface.

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

see \Zend\Mvc\Router\Http\Route::match()

Parameters

$pathOffset

stringnull

Returns

Build a path.

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

Parameters

$parts

array

$mergedParams

array

$isOptional

bool

$hasChild

bool

Exceptions

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

Returns

string

Build the matching regex from parsed parts.

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

Parameters

$parts

array

$constraints

array

$groupIndex

integer

Exceptions

\Zend\Mvc\Router\Exception\RuntimeException

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

 

<p>Cache for the encode output</p>

$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

 

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 = "!" / "$" / "&" / "'" / "(" / ")" / "" / "+" / "," / ";" / "="