Chain route.

package Default
inherited_from \Zend\Mvc\Router\Http\TreeRouteStack

 Methods

Create a new part route.

__construct(array $routes, \Zend\Mvc\Router\RoutePluginManager $routePlugins, \ArrayObject|null $prototypes = null

Parameters

$routes

array

$routePlugins

\Zend\Mvc\Router\RoutePluginManager

$prototypes

\ArrayObjectnull

Create a new simple route stack.

__construct(\Zend\Mvc\Router\RoutePluginManager $routePluginManager = null
Inherited

Parameters

$routePluginManager

\Zend\Mvc\Router\RoutePluginManager

Add a prototype.

addPrototype(string $name, mixed $route) : \Zend\Mvc\Router\Http\TreeRouteStack
Inherited

Parameters

$name

string

$route

mixed

Returns

\Zend\Mvc\Router\Http\TreeRouteStack

Add multiple prototypes at once.

addPrototypes(\Traversable $routes) : \Zend\Mvc\Router\Http\TreeRouteStack
Inherited

Parameters

$routes

\Traversable

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException

Returns

\Zend\Mvc\Router\Http\TreeRouteStack

addRoute(): defined by RouteStackInterface interface.

addRoute(string $name, mixed $route, integer $priority = null) : \Zend\Mvc\Router\SimpleRouteStack
Inherited
see
inherited_from \Zend\Mvc\Router\RouteStackInterface::addRoute()

Parameters

$name

string

$route

mixed

$priority

integer

Returns

\Zend\Mvc\Router\SimpleRouteStack

addRoutes(): defined by RouteStackInterface interface.

addRoutes(array|\Traversable $routes) : \Zend\Mvc\Router\SimpleRouteStack
Inherited
see
inherited_from \Zend\Mvc\Router\RouteStackInterface::addRoutes()

Parameters

$routes

array\Traversable

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException

Returns

\Zend\Mvc\Router\SimpleRouteStack

assemble(): Defined by RouteInterface interface.

assemble(array $params = array(), array $options = array()) : mixed
see
inherited_from \Zend\Mvc\Router\Http\TreeRouteStack::assemble()

Parameters

$params

array

$options

array

Returns

mixed

assemble(): defined by RouteInterface interface.

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

Parameters

$params

array

$options

array

Exceptions

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

Returns

mixed

factory(): defined by RouteInterface interface.

factory(mixed $options = array()) : \Zend\Mvc\Router\Http\Part
Static
see
inherited_from \Zend\Mvc\Router\Http\TreeRouteStack::factory()

Parameters

$options

mixed

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException

Returns

\Zend\Mvc\Router\Http\Part

factory(): defined by RouteInterface interface.

factory(array|\Traversable $options = array()) : \Zend\Mvc\Router\SimpleRouteStack
InheritedStatic
see

Parameters

$options

array\Traversable

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException

Returns

\Zend\Mvc\Router\SimpleRouteStack

getAssembledParams(): defined by RouteInterface interface.

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

Returns

array

Get the base URL.

getBaseUrl() : string
Inherited

Returns

string

Get a prototype.

getPrototype(string $name) : \Zend\Mvc\Router\Http\RouteInterface | null
Inherited

Parameters

$name

string

Returns

\Zend\Mvc\Router\Http\RouteInterfacenull

Get the request URI.

getRequestUri() : \Zend\Uri\Http
Inherited

Returns

\Zend\Uri\Http

Get a route by name

getRoute(string $name) : \Zend\Mvc\Router\RouteInterface
Inherited

Parameters

$name

string

Returns

\Zend\Mvc\Router\RouteInterfacethe route

Get the route plugin manager.

getRoutePluginManager() : \Zend\Mvc\Router\RoutePluginManager
Inherited

Returns

\Zend\Mvc\Router\RoutePluginManager

Get the added routes

getRoutes() : \Traversable
Inherited

Returns

\Traversablelist of all routes

Check if a route with a specific name exists

hasRoute(string $name) : boolean
Inherited

Parameters

$name

string

Returns

booleantrue if route exists

match(): defined by RouteInterface interface.

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

Parameters

$request

\Zend\Stdlib\RequestInterface

$pathOffset

integernull

$options

array

Returns

\Zend\Mvc\Router\Http\RouteMatchnull

match(): defined by RouteInterface interface.

match(\Zend\Stdlib\RequestInterface $request) : \Zend\Mvc\Router\RouteMatch | null
Inherited
see

Parameters

$request

\Zend\Stdlib\RequestInterface

Returns

\Zend\Mvc\Router\RouteMatchnull

removeRoute(): defined by RouteStackInterface interface.

removeRoute(string $name) : \Zend\Mvc\Router\SimpleRouteStack
Inherited
see
inherited_from \Zend\Mvc\Router\RouteStackInterface::removeRoute()

Parameters

$name

string

Returns

\Zend\Mvc\Router\SimpleRouteStack

Set the base URL.

setBaseUrl(string $baseUrl) : \Zend\Mvc\Router\Http\Chain
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$baseUrl

string

Returns

\Zend\Mvc\Router\Http\Chain

Set a default parameter.

setDefaultParam(string $name, mixed $value) : \Zend\Mvc\Router\SimpleRouteStack
Inherited

Parameters

$name

string

$value

mixed

Returns

\Zend\Mvc\Router\SimpleRouteStack

Set a default parameters.

setDefaultParams(array $params) : \Zend\Mvc\Router\SimpleRouteStack
Inherited

Parameters

$params

array

Returns

\Zend\Mvc\Router\SimpleRouteStack

Set the request URI.

setRequestUri(\Zend\Uri\Http $uri) : \Zend\Mvc\Router\Http\TreeRouteStack
Inherited

Parameters

$uri

\Zend\Uri\Http

Returns

\Zend\Mvc\Router\Http\TreeRouteStack

Set the route plugin manager.

setRoutePluginManager(\Zend\Mvc\Router\RoutePluginManager $routePlugins) : \Zend\Mvc\Router\SimpleRouteStack
Inherited

Parameters

$routePlugins

\Zend\Mvc\Router\RoutePluginManager

Returns

\Zend\Mvc\Router\SimpleRouteStack

setRoutes(): defined by RouteStackInterface interface.

setRoutes(array|\Traversable $routes) : \Zend\Mvc\Router\SimpleRouteStack
Inherited
inherited_from \Zend\Mvc\Router\RouteStackInterface::setRoutes()

Parameters

$routes

array\Traversable

Returns

\Zend\Mvc\Router\SimpleRouteStack

Init method for extending classes.

init() : void
Inherited

Create a route from array specifications.

routeFromArray(array|\Traversable $specs) : \Zend\Mvc\Router\RouteInterface
Inherited

Parameters

$specs

array\Traversable

Exceptions

\Zend\Mvc\Router\Exception\InvalidArgumentException

Returns

\Zend\Mvc\Router\RouteInterface

 Properties

 

List of assembled parameters.

$assembledParams : array

Default

array()
 

Base URL.

$baseUrl : string

Default

 

Chain routes.

$chainRoutes : array

Default

 

Default parameters.

$defaultParams : array

Default

array()
 

Prototype routes.

$prototypes : \ArrayObject

Default

We use an ArrayObject in this case so we can easily pass it down the tree by reference.

 

Request URI.

$requestUri : \Zend\Uri\Http

Default

 

Route plugin manager

$routePluginManager : \Zend\Mvc\Router\RoutePluginManager

Default

 

Stack containing all routes.

$routes : \Zend\Mvc\Router\PriorityList

Default