Class Zend_Controller_Router_Route_Regex

Description

Regex Route

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


	
			
Variable Summary
 mixed $_defaults
 mixed $_regex
 mixed $_reverse
 mixed $_values
Method Summary
 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 getMappedValues (array $values, [boolean $reversed = false], [boolean $preserve = false])
 array|false match (string $path)
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
Constructor __construct (line 41)
  • access: public
Zend_Controller_Router_Route_Regex __construct ( $route, [ $defaults = array()], [ $map = array()], [ $reverse = null])
  • $route
  • $defaults
  • $map
  • $reverse
assemble (line 123)

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
getDefault (line 153)

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 164)

Return an array of defaults

  • return: Route defaults
  • access: public
array getDefaults ()
getMappedValues (line 94)

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.
match (line 56)

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

Documentation generated on Wed, 21 Feb 2007 12:02:50 -0800 by phpDocumentor 1.3.1