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

Public Member Functions

 __construct (Zend_Controller_Front $front, array $defaults=array(), array $responders=array())
 Constructor.
 
 match ($request, $partial=false)
 Matches a user submitted request.
 
 assemble ($data=array(), $reset=false, $encode=true)
 Assembles user submitted parameters forming a URL path defined by this route.
 
 getVersion ()
 Tells Rewrite Router which version this Route is.
 
- Public Member Functions inherited from Zend_Controller_Router_Route_Module
 getVersion ()
 
 __construct (array $defaults=array(), Zend_Controller_Dispatcher_Interface $dispatcher=null, Zend_Controller_Request_Abstract $request=null)
 Constructor.
 
 match ($path, $partial=false)
 Matches a user submitted path.
 
 assemble ($data=array(), $reset=false, $encode=true, $partial=false)
 Assembles user submitted parameters forming a URL path defined by this route.
 
 getDefault ($name)
 Return a single parameter of route's defaults.
 
 getDefaults ()
 Return an array of defaults.
 
- 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
 match ($path)
 

Static Public Member Functions

static getInstance (Zend_Config $config)
 Instantiates route based on passed Zend_Config structure.
 
- Static Public Member Functions inherited from Zend_Controller_Router_Route_Module
static getInstance (Zend_Config $config)
 Instantiates route based on passed Zend_Config structure.
 

Protected Member Functions

 _parseResponders ($responders)
 Parses the responders array sent to constructor to know which modules and/or controllers are RESTful.
 
 _checkRestfulModule ($moduleName)
 Determine if a specified module supports RESTful routing.
 
 _checkRestfulController ($moduleName, $controllerName)
 Determine if a specified module + controller combination supports RESTful routing.
 
 _allRestful ()
 Determines if RESTful routing applies to the entire app.
 
 _fullRestfulModule ($moduleName)
 Determines if RESTful routing applies to an entire module.
 
- Protected Member Functions inherited from Zend_Controller_Router_Route_Module
 _setRequestKeys ()
 Set request keys based on values in request object.
 

Protected Attributes

 $_restfulModules = null
 
 $_restfulControllers = null
 
 $_front
 
- Protected Attributes inherited from Zend_Controller_Router_Route_Module
 $_defaults
 
 $_values = array()
 
 $_moduleValid = false
 
 $_keysSet = false
 
 $_moduleKey = 'module'
 
 $_controllerKey = 'controller'
 
 $_actionKey = 'action'
 
 $_dispatcher
 
 $_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 ( Zend_Controller_Front  $front,
array  $defaults = array(),
array  $responders = array() 
)

Constructor.

Parameters
Zend_Controller_Front$frontFront Controller object
array$defaultsDefaults for map variables with keys as variable names
array$respondersModules or controllers to receive RESTful routes

Member Function Documentation

_allRestful ( )
protected

Determines if RESTful routing applies to the entire app.

Returns
bool
_checkRestfulController (   $moduleName,
  $controllerName 
)
protected

Determine if a specified module + controller combination supports RESTful routing.

Parameters
string$moduleName
string$controllerName
Returns
bool
_checkRestfulModule (   $moduleName)
protected

Determine if a specified module supports RESTful routing.

Parameters
string$moduleName
Returns
bool
_fullRestfulModule (   $moduleName)
protected

Determines if RESTful routing applies to an entire module.

Parameters
string$moduleName
Returns
bool
_parseResponders (   $responders)
protected

Parses the responders array sent to constructor to know which modules and/or controllers are RESTful.

Parameters
array$responders
assemble (   $data = array(),
  $reset = false,
  $encode = true 
)

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

Parameters
array$dataAn array of variable and value pairs used as parameters
bool$resetWeither to reset the current params
bool$encodeWeither to return urlencoded string
Returns
string Route path with user submitted parameters

Implements Zend_Controller_Router_Route_Interface.

static getInstance ( Zend_Config  $config)
static

Instantiates route based on passed Zend_Config structure.

Implements Zend_Controller_Router_Route_Interface.

getVersion ( )

Tells Rewrite Router which version this Route is.

Returns
int Route "version"
match (   $request,
  $partial = false 
)

Matches a user submitted request.

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

If a request object is registered, it uses its setModuleName(), setControllerName(), and setActionName() accessors to set those values. Always returns the values as an array.

Parameters
Zend_Controller_Request_Http$requestRequest used to match against this routing ruleset
Returns
array An array of assigned values or a false on a mismatch

Member Data Documentation

$_front
protected
$_restfulControllers = null
protected
$_restfulModules = null
protected