Class Zend_Controller_Router_Route

Description

Route

Located in /Controller/Router/Route.php (line 35)

Zend_Controller_Router_Route_Abstract
   |
   --Zend_Controller_Router_Route
Variable Summary
Method Summary
 static mixed getDefaultLocale ()
 static void getInstance ( $config)
 static void setDefaultLocale ([mixed $locale = null])
 static void setDefaultTranslator ([ $translator = null])
 Zend_Controller_Router_Route __construct (string $route, [array $defaults = array()], [array $reqs = array()], [ $translator = null], [ $locale = null])
 string assemble ([array $data = array()], [boolean $reset = false], [ $encode = false], [ $partial = false])
 string getDefault (string $name)
 array getDefaults ()
 mixed getLocale ()
 array getVariables ()
 void getVersion ()
 array|false match (string $path, [ $partial = false])
 void setLocale (mixed $locale)
 void setTranslator ( $translator)
Variables
static mixed $_defaultLocale (line 56)

Default locale

  • access: protected
static Zend_Translate $_defaultTranslator (line 42)

Default translator

  • access: protected
mixed $_defaultRegex = null (line 82)
  • access: protected
array $_defaults = array() (line 102)

Holds user submitted default values for route's variables. Name and value pairs.

  • access: protected
boolean $_isTranslated = false (line 70)

Wether this is a translated route or not

  • access: protected
mixed $_locale (line 63)

Locale

  • access: protected
array $_parts = array() (line 96)

Holds Route patterns for all URL parts. In case of a variable it stores it's regex requirement or null. In case of a static part, it holds only it's direct value.

In case of a wildcard, it stores an asterisk (*)

  • access: protected
mixed $_regexDelimiter = '#' (line 81)
  • access: protected
array $_requirements = array() (line 109)

Holds user submitted regular expression patterns for route's variables' values.

Name and value pairs.

  • access: protected
int $_staticCount = 0 (line 130)

Helper var that holds a count of route pattern's static parts

for validation

  • access: protected
array $_translatable = array() (line 77)

Translatable variables

  • access: protected
Zend_Translate $_translator (line 49)

Translator

  • access: protected
mixed $_urlDelimiter = '/' (line 80)
  • access: protected
mixed $_urlVariable = ':' (line 79)
  • access: protected
array $_values = array() (line 116)

Associative array filled on match() that holds matched path values for given variable names.

  • access: protected
array $_variables = array() (line 88)

Holds names of all route's pattern variable names. Array index holds a position in URL.

  • access: protected
array $_wildcardData = array() (line 123)

Associative array filled on match() that holds wildcard variable names and values.

  • 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 getDefaultLocale (line 518)

Get the default locale

  • access: public
static mixed getDefaultLocale ()
static getDefaultTranslator (line 458)

Get the default translator

  • access: public
static Zend_Translate getDefaultTranslator ()
static getInstance (line 141)

Instantiates route based on passed Zend_Config structure

  • access: public
static void getInstance ( $config)
static setDefaultLocale (line 508)

Set a default locale

  • access: public
static void setDefaultLocale ([mixed $locale = null])
  • mixed $locale
static setDefaultTranslator (line 448)

Set a default translator

  • access: public
static void setDefaultTranslator ([ $translator = null])
Constructor __construct (line 158)

Prepares the route for mapping by splitting (exploding) it to a corresponding atomic parts. These parts are assigned a position which is later used for matching and preparing values.

  • access: public
Zend_Controller_Router_Route __construct (string $route, [array $defaults = array()], [array $reqs = array()], [ $translator = null], [ $locale = null])
  • string $route: Map used to match with later submitted URL path
  • array $defaults: Defaults for map variables with keys as variable names
  • array $reqs: Regular expression requirements for variables (keys as variable names)
  • Zend_Translate $translator: Translator to use for this instance
  • $locale
assemble (line 315)

Assembles user submitted parameters forming a URL path defined by this route

  • return: Route path with user submitted parameters
  • access: public
string assemble ([array $data = array()], [boolean $reset = false], [ $encode = false], [ $partial = false])
  • array $data: An array of variable and value pairs used as parameters
  • boolean $reset: Whether or not to set route defaults with those provided in $data
  • $encode
  • $partial
getDefault (line 416)

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

Return an array of defaults

  • return: Route defaults
  • access: public
array getDefaults ()
getLocale (line 539)

Get the locale

  • access: public
mixed getLocale ()
getTranslator (line 480)

Get the translator

  • throws: Zend_Controller_Router_Exception When no translator can be found
  • access: public
Zend_Translate getTranslator ()
getVariables (line 437)

Get all variables which are used by the route

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

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

Matches a user submitted path with parts defined by a map. Assigns and returns an array of variables 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
setLocale (line 529)

Set a locale

  • access: public
void setLocale (mixed $locale)
  • mixed $locale
setTranslator (line 469)

Set a translator

  • access: public
void setTranslator ( $translator)

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:42:53 -0400 by phpDocumentor 1.4.3