Class Zend_Controller_Router_Route_Regex

Description

Regex Route

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Controller/Router/Route/Regex.php (line 34)

Zend_Controller_Router_Route_Abstract
   |
   --Zend_Controller_Router_Route_Regex
Variable Summary
 mixed $_defaults
 mixed $_map
 mixed $_regex
 mixed $_reverse
 mixed $_values
Method Summary
 static void getInstance ( $config)
 Zend_Controller_Router_Route_Regex __construct ( $route, [ $defaults = array()], [ $map = array()], [ $reverse = null])
 string assemble ([array $data = array()], [ $reset = false], [ $encode = false], [ $partial = false])
 string getDefault (string $name)
 array getDefaults ()
 array getVariables ()
 void getVersion ()
 array|false match (string $path, [ $partial = false])
 array _arrayMergeNumericKeys ( $array1,  $array2)
 array _getMappedValues (array $values, [boolean $reversed = false], [boolean $preserve = false])
Variables
mixed $_defaults = array() (line 37)
  • access: protected
mixed $_map = array() (line 39)
  • access: protected
mixed $_regex = null (line 36)
  • access: protected
mixed $_reverse = null (line 38)
  • access: protected
mixed $_values = array() (line 40)
  • access: protected

Inherited Variables

Inherited from Zend_Controller_Router_Route_Abstract

Zend_Controller_Router_Route_Abstract::$_isAbstract
Zend_Controller_Router_Route_Abstract::$_matchedPath
Methods
static getInstance (line 47)

Instantiates route based on passed Zend_Config structure

  • access: public
static void getInstance ( $config)
Constructor __construct (line 55)
  • access: public
Zend_Controller_Router_Route_Regex __construct ( $route, [ $defaults = array()], [ $map = array()], [ $reverse = null])
  • $route
  • $defaults
  • $map
  • $reverse
assemble (line 165)

Assembles a URL path defined by this route

  • return: Route path with user submitted parameters
  • access: public
string assemble ([array $data = array()], [ $reset = false], [ $encode = false], [ $partial = false])
  • array $data: An array of name (or index) and value pairs used as parameters
  • $reset
  • $encode
  • $partial
getDefault (line 216)

Return a single parameter of route's defaults

  • return: Previously set default
  • access: public
string getDefault (string $name)
  • string $name: Array key of the parameter
getDefaults (line 227)

Return an array of defaults

  • return: Route defaults
  • access: public
array getDefaults ()
getVariables (line 236)

Get all variables which are used by the route

  • access: public
array getVariables ()
getVersion (line 63)
  • access: public
void getVersion ()

Redefinition of:
Zend_Controller_Router_Route_Abstract::getVersion()
Get the version of the route
match (line 74)

Matches a user submitted path with a previously defined route.

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

  • return: An array of assigned values or a false on a mismatch
  • access: public
array|false match (string $path, [ $partial = false])
  • string $path: Path used to match against this routing map
  • $partial
_arrayMergeNumericKeys (line 259)

_arrayMergeNumericKeys() - allows for a strict key (numeric's included) array_merge.

php's array_merge() lacks the ability to merge with numeric keys.

  • access: protected
array _arrayMergeNumericKeys ( $array1,  $array2)
  • array $array1
  • array $array2
_getMappedValues (line 123)

Maps numerically indexed array values to it's associative mapped counterpart.

Or vice versa. Uses user provided map array which consists of index => name parameter mapping. If map is not found, it returns original array.

Method strips destination type of keys form source array. Ie. if source array is indexed numerically then every associative key will be stripped. Vice versa if reversed is set to true.

  • return: An array of mapped values
  • access: protected
array _getMappedValues (array $values, [boolean $reversed = false], [boolean $preserve = false])
  • array $values: Indexed or associative array of values to map
  • boolean $reversed: False means translation of index to association. True means reverse.
  • boolean $preserve: Should wrong type of keys be preserved or stripped.

Inherited Methods

Inherited From Zend_Controller_Router_Route_Abstract

 Zend_Controller_Router_Route_Abstract::chain()
 Zend_Controller_Router_Route_Abstract::getMatchedPath()
 Zend_Controller_Router_Route_Abstract::getVersion()
 Zend_Controller_Router_Route_Abstract::isAbstract()
 Zend_Controller_Router_Route_Abstract::setMatchedPath()

Documentation generated on Mon, 21 Jun 2010 15:41:37 -0400 by phpDocumentor 1.4.3