Class Zend_Controller_Router_Route_Regex

Description

Implements interfaces:

Regex Route

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


	
			
Variable Summary
 mixed $_defaults
 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()])
 string getDefault (name $name)
 array getDefaults ()
 array|false match (string $path)
 array _getMappedValues (array $values, [boolean $reversed = false], [boolean $preserve = false])
Variables
mixed $_defaults = array() (line 36)
  • access: protected
mixed $_regex = null (line 35)
  • access: protected
mixed $_reverse = null (line 37)
  • access: protected
mixed $_values = array() (line 39)
  • access: protected
Methods
static getInstance (line 44)

Instantiates route based on passed Zend_Config structure

  • access: public
static void getInstance ( $config)

Implementation of:
Zend_Controller_Router_Route_Interface::getInstance()
Constructor __construct (line 52)
  • access: public
Zend_Controller_Router_Route_Regex __construct ( $route, [ $defaults = array()], [ $map = array()], [ $reverse = null])
  • $route
  • $defaults
  • $map
  • $reverse
assemble (line 140)

Assembles a URL path defined by this route

  • return: Route path with user submitted parameters
  • access: public
string assemble ([array $data = array()])
  • array $data: An array of name (or index) and value pairs used as parameters

Implementation of:
Zend_Controller_Router_Route_Interface::assemble()
getDefault (line 170)

Return a single parameter of route's defaults

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

Return an array of defaults

  • return: Route defaults
  • access: public
array getDefaults ()
match (line 67)

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)
  • string $path: Path used to match against this routing map

Implementation of:
Zend_Controller_Router_Route_Interface::match()
_getMappedValues (line 105)

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.

Documentation generated on Sun, 27 May 2007 23:27:05 -0700 by phpDocumentor 1.3.2