Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Zend_Controller_Router_Route_Hostname Class Reference

Public Member Functions

 setRequest (Zend_Controller_Request_Abstract $request=null)
 Set the request object.
 
 getRequest ()
 Get the request object.
 
 __construct ($route, $defaults=array(), $reqs=array(), $scheme=null)
 Prepares the route for mapping by splitting (exploding) it to a corresponding atomic parts.
 
 match ($request)
 Matches a user submitted path with parts defined by a map.
 
 assemble ($data=array(), $reset=false, $encode=false, $partial=false)
 Assembles user submitted parameters forming a hostname defined by this route.
 
 getDefault ($name)
 Return a single parameter of route's defaults.
 
 getDefaults ()
 Return an array of defaults.
 
 getVariables ()
 Get all variables which are used by the route.
 
- Public Member Functions inherited from Zend_Controller_Router_Route_Abstract
 getVersion ()
 Get the version of the route.
 
 setMatchedPath ($path)
 Set partially matched path.
 
 getMatchedPath ()
 Get partially matched path.
 
 isAbstract ($flag=null)
 Check or set wether this is an abstract route or not.
 
 chain (Zend_Controller_Router_Route_Abstract $route, $separator= '/')
 Create a new chain.
 
- Public Member Functions inherited from Zend_Controller_Router_Route_Interface
 assemble ($data=array(), $reset=false, $encode=false)
 

Static Public Member Functions

static getInstance (Zend_Config $config)
 Instantiates route based on passed Zend_Config structure.
 

Protected Attributes

 $_hostVariable = ':'
 
 $_regexDelimiter = '#'
 
 $_defaultRegex = null
 
 $_variables = array()
 
 $_parts = array()
 
 $_defaults = array()
 
 $_requirements = array()
 
 $_scheme = null
 
 $_values = array()
 
 $_request
 
- Protected Attributes inherited from Zend_Controller_Router_Route_Abstract
 $_isAbstract = false
 
 $_matchedPath = null
 

Additional Inherited Members

- Public Attributes inherited from Zend_Controller_Router_Route_Abstract
const URI_DELIMITER = '/'
 URI delimiter.
 

Constructor & Destructor Documentation

__construct (   $route,
  $defaults = array(),
  $reqs = array(),
  $scheme = null 
)

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.

Parameters
string$routeMap used to match with later submitted hostname
array$defaultsDefaults for map variables with keys as variable names
array$reqsRegular expression requirements for variables (keys as variable names)
string$scheme

Member Function Documentation

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

Assembles user submitted parameters forming a hostname defined by this route.

Parameters
array$dataAn array of variable and value pairs used as parameters
boolean$resetWhether or not to set route defaults with those provided in $data
Returns
string Route path with user submitted parameters
getDefault (   $name)

Return a single parameter of route's defaults.

Parameters
string$nameArray key of the parameter
Returns
string Previously set default
getDefaults ( )

Return an array of defaults.

Returns
array Route defaults
static getInstance ( Zend_Config  $config)
static

Instantiates route based on passed Zend_Config structure.

Parameters
Zend_Config$configConfiguration object

Implements Zend_Controller_Router_Route_Interface.

getRequest ( )

Get the request object.

Returns
Zend_Controller_Request_Abstract $request
getVariables ( )

Get all variables which are used by the route.

Returns
array
match (   $request)

Matches a user submitted path with parts defined by a map.

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

Parameters
Zend_Controller_Request_Http$requestRequest to get the host from
Returns
array|false An array of assigned values or a false on a mismatch

Implements Zend_Controller_Router_Route_Interface.

setRequest ( Zend_Controller_Request_Abstract  $request = null)

Set the request object.

Parameters
Zend_Controller_Request_Abstract | null$request
Returns
void

Member Data Documentation

$_defaultRegex = null
protected
$_defaults = array()
protected
$_hostVariable = ':'
protected
$_parts = array()
protected
$_regexDelimiter = '#'
protected
$_request
protected
$_requirements = array()
protected
$_scheme = null
protected
$_values = array()
protected
$_variables = array()
protected