Class TranslatorAwareTreeRouteStack

Summary

Fully Qualified Name: Laminas\Mvc\I18n\Router\TranslatorAwareTreeRouteStack
Extends: TreeRouteStack
Implements: TranslatorAwareInterface

Description

Translator aware tree route stack.

Methods

Name Description Defined By
__construct() Create a new simple route stack. SimpleRouteStack
addPrototype() Add a prototype. TreeRouteStack
addPrototypes() Add multiple prototypes at once. TreeRouteStack
addRoute() addRoute(): defined by RouteStackInterface interface. TreeRouteStack
addRoutes() addRoutes(): defined by RouteStackInterface interface. SimpleRouteStack
assemble() assemble(): defined by RouteInterface interface. TranslatorAwareTreeRouteStack
factory() Override TreeRouteStack::factory() TranslatorAwareTreeRouteStack
getBaseUrl() Get the base URL. TreeRouteStack
getPrototype() Get a prototype. TreeRouteStack
getRequestUri() Get the request URI. TreeRouteStack
getRoute() Get a route by name SimpleRouteStack
getRoutePluginManager() Get the route plugin manager. SimpleRouteStack
getRoutes() Get the added routes SimpleRouteStack
getTranslator() getTranslator(): defined by TranslatorAwareInterface. TranslatorAwareTreeRouteStack
getTranslatorTextDomain() getTranslatorTextDomain(): defined by TranslatorAwareInterface. TranslatorAwareTreeRouteStack
hasRoute() Check if a route with a specific name exists SimpleRouteStack
hasTranslator() hasTranslator(): defined by TranslatorAwareInterface. TranslatorAwareTreeRouteStack
isTranslatorEnabled() isTranslatorEnabled(): defined by TranslatorAwareInterface. TranslatorAwareTreeRouteStack
match() match(): defined by RouteInterface TranslatorAwareTreeRouteStack
removeRoute() removeRoute(): defined by RouteStackInterface interface. SimpleRouteStack
setBaseUrl() Set the base URL. TreeRouteStack
setDefaultParam() Set a default parameter. SimpleRouteStack
setDefaultParams() Set a default parameters. SimpleRouteStack
setRequestUri() Set the request URI. TreeRouteStack
setRoutePluginManager() Set the route plugin manager. SimpleRouteStack
setRoutes() setRoutes(): defined by RouteStackInterface interface. SimpleRouteStack
setTranslator() setTranslator(): defined by TranslatorAwareInterface. TranslatorAwareTreeRouteStack
setTranslatorEnabled() setTranslatorEnabled(): defined by TranslatorAwareInterface. TranslatorAwareTreeRouteStack
setTranslatorTextDomain() setTranslatorTextDomain(): defined by TranslatorAwareInterface. TranslatorAwareTreeRouteStack

Method Details

__construct()

Create a new simple route stack.

Parameter Name Type Description
$routePluginManager \RoutePluginManager

Returns:

addPrototype()

Add a prototype.

Parameter Name Type Description
$name string
$route mixed

Returns: \TreeRouteStack

addPrototypes()

Add multiple prototypes at once.

Parameter Name Type Description
$routes \Traversable

Returns: \TreeRouteStack

addRoute()

addRoute(): defined by RouteStackInterface interface.

Parameter Name Type Description
$name string
$route mixed
$priority int

Returns: \TreeRouteStack

addRoutes()

addRoutes(): defined by RouteStackInterface interface.

Parameter Name Type Description
$routes array|\Traversable

Returns: \SimpleRouteStack

assemble()

assemble(): defined by RouteInterface interface.

Parameter Name Type Description
$params array
$options array

Returns: mixed

factory()

Override TreeRouteStack::factory()

Overrides TreeRouteStack::factory() in order to inject the configured translator_text_domain, if present, prior to returning the instance.

Parameter Name Type Description
$options array

Returns: self

getBaseUrl()

Get the base URL.

Returns: string

getPrototype()

Get a prototype.

Parameter Name Type Description
$name string

Returns: \RouteInterface|null

getRequestUri()

Get the request URI.

Returns: \HttpUri

getRoute()

Get a route by name

Parameter Name Type Description
$name string

Returns: \RouteInterface the route

getRoutePluginManager()

Get the route plugin manager.

Returns: \RoutePluginManager

getRoutes()

Get the added routes

Returns: \Traversable list of all routes

getTranslator()

getTranslator(): defined by TranslatorAwareInterface.

Returns: \Translator

getTranslatorTextDomain()

getTranslatorTextDomain(): defined by TranslatorAwareInterface.

Returns: string

hasRoute()

Check if a route with a specific name exists

Parameter Name Type Description
$name string

Returns: bool true if route exists

hasTranslator()

hasTranslator(): defined by TranslatorAwareInterface.

Returns: bool

isTranslatorEnabled()

isTranslatorEnabled(): defined by TranslatorAwareInterface.

Returns: bool

match()

match(): defined by RouteInterface

Parameter Name Type Description
$request \Request
$pathOffset int|null
$options array

Returns: \RouteMatch|null

removeRoute()

removeRoute(): defined by RouteStackInterface interface.

Parameter Name Type Description
$name string

Returns: \SimpleRouteStack

setBaseUrl()

Set the base URL.

Parameter Name Type Description
$baseUrl string

Returns: self

setDefaultParam()

Set a default parameter.

Parameter Name Type Description
$name string
$value mixed

Returns: \SimpleRouteStack

setDefaultParams()

Set a default parameters.

Parameter Name Type Description
$params array

Returns: \SimpleRouteStack

setRequestUri()

Set the request URI.

Parameter Name Type Description
$uri \HttpUri

Returns: \TreeRouteStack

setRoutePluginManager()

Set the route plugin manager.

Parameter Name Type Description
$routePlugins \RoutePluginManager

Returns: \SimpleRouteStack

setRoutes()

setRoutes(): defined by RouteStackInterface interface.

Parameter Name Type Description
$routes array|\Traversable

Returns: \SimpleRouteStack

setTranslator()

setTranslator(): defined by TranslatorAwareInterface.

Parameter Name Type Description
$translator \Translator
$textDomain string

Returns: \TreeRouteStack

setTranslatorEnabled()

setTranslatorEnabled(): defined by TranslatorAwareInterface.

Parameter Name Type Description
$enabled bool

Returns: \TreeRouteStack

setTranslatorTextDomain()

setTranslatorTextDomain(): defined by TranslatorAwareInterface.

Parameter Name Type Description
$textDomain string

Returns: self

Top