Chain route is used for managing route chaining.

Implements interface and provides convenience methods

package Zend_Controller
subpackage Router
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Controller_Router_Route_Abstract

 Methods

Assembles a URL path defined by this route

assemble(array $data = array(), boolean $reset = false, boolean $encode = false) : string

Parameters

$data

array

An array of variable and value pairs used as parameters

$reset

boolean

$encode

boolean

Returns

stringRoute path with user submitted parameters

Add a route to this chain

chain(\Zend_Controller_Router_Route_Abstract $route, string $separator = self::URI_DELIMITER) : \Zend_Controller_Router_Route_Chain
inherited_from \Zend_Controller_Router_Route_Abstract::chain()

Parameters

$route

\Zend_Controller_Router_Route_Abstract

$separator

string

Returns

\Zend_Controller_Router_Route_Chain

Create a new chain

chain(\Zend_Controller_Router_Route_Abstract $route, string $separator = '/') : \Zend_Controller_Router_Route_Chain
Inherited

Parameters

$route

\Zend_Controller_Router_Route_Abstract

$separator

string

Returns

\Zend_Controller_Router_Route_Chain

Return a single parameter of route's defaults

getDefault(string $name) : string

Parameters

$name

string

Array key of the parameter

Returns

stringPreviously set default

Return an array of defaults

getDefaults() : array

Returns

arrayRoute defaults

Instantiates route based on passed Zend_Config structure

getInstance(\Zend_Config $config) : \Zend_Controller_Router_Route_Chain
Static

Parameters

$config

\Zend_Config

Configuration object

Returns

\Zend_Controller_Router_Route_Chain

Get partially matched path

getMatchedPath() : string
Inherited

Returns

string

Get the version of the route

getVersion() : integer
Inherited

Returns

integer

Check or set wether this is an abstract route or not

isAbstract(boolean $flag = null) : boolean
Inherited

Parameters

$flag

boolean

Returns

boolean

Matches a user submitted path with a previously defined route.

match(\Zend_Controller_Request_Http $request, null $partial = null) : array | false

Assigns and returns an array of defaults on a successful match.

Parameters

$request

\Zend_Controller_Request_Http

Request to get the path info from

$partial

null

Returns

arrayfalseAn array of assigned values or a false on a mismatch

Set partially matched path

setMatchedPath(string $path) : void
Inherited

Parameters

$path

string

Set the request object for this and the child routes

setRequest(\Zend_Controller_Request_Abstract|null $request = null) : void

Parameters

$request

\Zend_Controller_Request_Abstractnull

 Properties

 

Wether this route is abstract or not

$_isAbstract : boolean

Default

false
 

Path matched by this route

$_matchedPath : string

Default

null
 

Routes

$_routes : array

Default

array()
 

Separators

$_separators : array

Default

array()

 Constants

 

URI delimiter

URI_DELIMITER = '/'