Translator aware tree route stack.

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

 Methods

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 \Zend\Mvc\Router\RouteInterface interface.

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

Parameters

$params

array

$options

array

Exceptions

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

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

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

getTranslator(): defined by TranslatorAwareInterface.

getTranslator() : \Zend\I18n\Translator\TranslatorInterface
see
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::getTranslator()

Returns

\Zend\I18n\Translator\TranslatorInterface

getTranslatorTextDomain(): defined by TranslatorAwareInterface.

getTranslatorTextDomain() : string
see
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::getTranslatorTextDomain()

Returns

string

Check if a route with a specific name exists

hasRoute(string $name) : boolean
Inherited

Parameters

$name

string

Returns

booleantrue if route exists

hasTranslator(): defined by TranslatorAwareInterface.

hasTranslator() : boolean
see
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::hasTranslator()

Returns

boolean

isTranslatorEnabled(): defined by TranslatorAwareInterface.

isTranslatorEnabled() : boolean
see
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::isTranslatorEnabled()

Returns

boolean

match(): defined by \Zend\Mvc\Router\RouteInterface

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\TranslatorAwareTreeRouteStack
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$baseUrl

string

Returns

\Zend\Mvc\Router\Http\TranslatorAwareTreeRouteStack

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

setTranslator(): defined by TranslatorAwareInterface.

setTranslator(\Zend\I18n\Translator\TranslatorInterface $translator = null, string $textDomain = null) : \Zend\Mvc\Router\Http\TreeRouteStack
see
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslator()

Parameters

$translator

\Zend\I18n\Translator\TranslatorInterface

$textDomain

string

Returns

\Zend\Mvc\Router\Http\TreeRouteStack

setTranslatorEnabled(): defined by TranslatorAwareInterface.

setTranslatorEnabled(boolean $enabled = true) : \Zend\Mvc\Router\Http\TreeRouteStack
see
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslatorEnabled()

Parameters

$enabled

boolean

Returns

\Zend\Mvc\Router\Http\TreeRouteStack

setTranslatorTextDomain(): defined by TranslatorAwareInterface.

setTranslatorTextDomain(string $textDomain = 'default') : \Zend\Mvc\Router\Http\TranslatorAwareTreeRouteStack
see
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslatorTextDomain()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$textDomain

string

Returns

\Zend\Mvc\Router\Http\TranslatorAwareTreeRouteStack

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

 

Base URL.

$baseUrl : string

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

 

Translator used for translatable segments.

$translator : \Zend\I18n\Translator\TranslatorInterface

Default

 

Whether the translator is enabled.

$translatorEnabled : boolean

Default

true
 

Translator text domain to use.

$translatorTextDomain : string

Default

'default'