Zend Framework  3.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SimpleRouteStack Class Reference

Simple route stack implementation. More...

Public Member Functions

 __construct (RoutePluginManager $routePluginManager=null)
 Create a new simple route stack.
 
 setRoutePluginManager (RoutePluginManager $routePlugins)
 Set the route plugin manager.
 
 getRoutePluginManager ()
 Get the route plugin manager.
 
 addRoutes ($routes)
 addRoutes(): defined by RouteStackInterface interface.
 
 addRoute ($name, $route, $priority=null)
 addRoute(): defined by RouteStackInterface interface.
 
 removeRoute ($name)
 removeRoute(): defined by RouteStackInterface interface.
 
 setRoutes ($routes)
 setRoutes(): defined by RouteStackInterface interface.
 
 getRoutes ()
 Get the added routes.
 
 hasRoute ($name)
 Check if a route with a specific name exists.
 
 getRoute ($name)
 Get a route by name.
 
 setDefaultParams (array $params)
 Set a default parameters.
 
 setDefaultParam ($name, $value)
 Set a default parameter.
 
 match (Request $request)
 match(): defined by RouteInterface interface.
 
 assemble (array $params=[], array $options=[])
 assemble(): defined by RouteInterface interface.
 

Static Public Member Functions

static factory ($options=[])
 factory(): defined by RouteInterface interface.
 

Protected Member Functions

 init ()
 Init method for extending classes.
 
 routeFromArray ($specs)
 Create a route from array specifications.
 

Protected Attributes

 $routes
 
 $routePluginManager
 
 $defaultParams = []
 

Detailed Description

Simple route stack implementation.

Constructor & Destructor Documentation

__construct ( RoutePluginManager  $routePluginManager = null)

Create a new simple route stack.

Parameters
RoutePluginManager$routePluginManager

Member Function Documentation

addRoute (   $name,
  $route,
  $priority = null 
)

addRoute(): defined by RouteStackInterface interface.

See Also
RouteStackInterface::addRoute()
Parameters
string$name
mixed$route
int$priority
Returns
SimpleRouteStack

Implements RouteStackInterface.

addRoutes (   $routes)

addRoutes(): defined by RouteStackInterface interface.

See Also
RouteStackInterface::addRoutes()
Parameters
array | Traversable$routes
Returns
SimpleRouteStack
Exceptions
Exception\InvalidArgumentException

Implements RouteStackInterface.

assemble ( array  $params = [],
array  $options = [] 
)

assemble(): defined by RouteInterface interface.

See Also
::assemble()
Parameters
array$params
array$options
Returns
mixed
Exceptions
Exception\InvalidArgumentException
Exception\RuntimeException

Implements RouteInterface.

static factory (   $options = [])
static

factory(): defined by RouteInterface interface.

See Also
::factory()
Parameters
array | Traversable$options
Returns
SimpleRouteStack
Exceptions
Exception\InvalidArgumentException

Implements RouteInterface.

getRoute (   $name)

Get a route by name.

Parameters
string$name
Returns
RouteInterface the route
getRoutePluginManager ( )

Get the route plugin manager.

Returns
RoutePluginManager
getRoutes ( )

Get the added routes.

Returns
Traversable list of all routes
hasRoute (   $name)

Check if a route with a specific name exists.

Parameters
string$name
Returns
bool true if route exists
init ( )
protected

Init method for extending classes.

Returns
void
match ( Request  $request)

match(): defined by RouteInterface interface.

See Also
::match()
Parameters
Request$request
Returns
RouteMatch|null

Implements RouteInterface.

removeRoute (   $name)

removeRoute(): defined by RouteStackInterface interface.

See Also
RouteStackInterface::removeRoute()
Parameters
string$name
Returns
SimpleRouteStack

Implements RouteStackInterface.

routeFromArray (   $specs)
protected

Create a route from array specifications.

Parameters
array | Traversable$specs
Returns
RouteInterface
Exceptions
Exception\InvalidArgumentException
setDefaultParam (   $name,
  $value 
)

Set a default parameter.

Parameters
string$name
mixed$value
Returns
SimpleRouteStack
setDefaultParams ( array  $params)

Set a default parameters.

Parameters
array$params
Returns
SimpleRouteStack
setRoutePluginManager ( RoutePluginManager  $routePlugins)

Set the route plugin manager.

Parameters
RoutePluginManager$routePlugins
Returns
SimpleRouteStack
setRoutes (   $routes)

setRoutes(): defined by RouteStackInterface interface.

Parameters
array | Traversable$routes
Returns
SimpleRouteStack

Implements RouteStackInterface.

Member Data Documentation

$defaultParams = []
protected
$routePluginManager
protected
$routes
protected