Regex route.

 Methods

Create a new regex route.

__construct(string $regex, string $spec, array $defaults) 

Parameters

$regex

string

$spec

string

$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\Regex

see \Zend\Mvc\Router\RouteInterface::factory()

Parameters

$options

array\Traversable

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException

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, int $pathOffset) : \Zend\Mvc\Router\Http\RouteMatch | null

Parameters

$pathOffset

int

Returns

 Properties

 

List of assembled parameters.

$assembledParams : array

 

Default values.

$defaults : array

 

Regex to match.

$regex : string

 

Specification for URL assembly.

$spec : string

Parameters accepting substitutions should be denoted as "%key%"