Hostname route.

 Methods

Create a new hostname 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\Hostname

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

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

Parameters

Returns

Build host.

buildHost(array $parts, array $mergedParams, bool $isOptional) : string

Parameters

$parts

array

$mergedParams

array

$isOptional

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, int $groupIndex) : string

Parameters

$parts

array

$constraints

array

$groupIndex

int

Exceptions

\Zend\Mvc\Router\Exception\RuntimeException

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 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