StaticRoute is used for managing static URIs.

It's a lot faster compared to the standard Route implementation.

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

Prepares the route for mapping.

__construct(string $route, array $defaults = array()

Parameters

$route

string

Map used to match with later submitted URL path

$defaults

array

Defaults for map variables with keys as variable names

Assembles a URL path defined by this route

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

Parameters

$data

array

An array of variable and value pairs used as parameters

$reset

$encode

$partial

Returns

stringRoute path with user submitted parameters

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_Static
Static

Parameters

$config

\Zend_Config

Configuration object

Returns

\Zend_Controller_Router_Route_Static

Get partially matched path

getMatchedPath() : string
Inherited

Returns

string

Get the version of the route

getVersion() : integer
inherited_from \Zend_Controller_Router_Route_Abstract::getVersion()

Returns

integer

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(string $path, $partial = false) : array | false

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

Parameters

$path

string

Path used to match against this routing map

$partial

Returns

arrayfalseAn array of assigned values or a false on a mismatch

Set partially matched path

setMatchedPath(string $path) : void
Inherited

Parameters

$path

string

 Properties

 

Default values for the route (ie. module, controller, action, params)

$_defaults : array

Default

array()
 

Wether this route is abstract or not

$_isAbstract : boolean

Default

false
 

Path matched by this route

$_matchedPath : string

Default

null
 

Route

$_route : string | null

Default

null

 Constants

 

URI delimiter

URI_DELIMITER = '/'