Class Zend_Controller_Router

Description

Implements interfaces:

Simple first implementation of a router, to be replaced with rules-based URI processor.

  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Controller/Router.php (line 46)


	
			
Variable Summary
Method Summary
 void __construct ([ $params = array()])
 Zend_Controller_Router clearParams ([null|string|array $name = null])
 mixed getParam (string $name)
 array getParams ()
 Zend_Controller_Router setParam (string $name, mixed $value)
Variables
array $_invokeParams = array() (line 53)

Array of invocation parameters to use when instantiating action

controllers

  • access: protected
Methods
Constructor __construct (line 61)

Constructor

  • access: public
void __construct ([ $params = array()])
  • array $params
clearParams (line 127)

Clear the controller parameter stack

By default, clears all parameters. If a parameter name is given, clears only that parameter; if an array of parameter names is provided, clears each.

  • access: public
Zend_Controller_Router clearParams ([null|string|array $name = null])
  • null|string|array $name: single key or array of keys for params to clear

Implementation of:
Zend_Controller_Router_Interface::clearParams()
Clear the controller parameter stack
getParam (line 98)

Retrieve a single parameter from the controller parameter stack

  • access: public
mixed getParam (string $name)
  • string $name

Implementation of:
Zend_Controller_Router_Interface::getParam()
Retrieve a single parameter from the controller parameter stack
getParams (line 112)

Retrieve action controller instantiation parameters

  • access: public
array getParams ()

Implementation of:
Zend_Controller_Router_Interface::getParams()
Retrieve the parameters to pass to helper object constructors
route (line 159)

Route a request

Routes requests of the format /controller/action by default (action may be omitted). Additional parameters may be specified as key/value pairs separated by the directory separator: /controller/action/key/value/key/value.

To specify a module to use (basically, subdirectory) when routing the request, set the 'useModules' parameter via the front controller or setParam(): $router->setParam('useModules', true)

  • access: public
void route (Zend_Controller_Request_Abstract $request)

Implementation of:
Zend_Controller_Router_Interface::route()
Processes a request and sets its controller and action. If no route was possible, an exception is thrown.
setParam (line 73)

Add or modify a parameter to use when instantiating an action controller

  • access: public
Zend_Controller_Router setParam (string $name, mixed $value)
  • string $name
  • mixed $value

Implementation of:
Zend_Controller_Router_Interface::setParam()
Add or modify a parameter with which to instantiate any helper objects
setParams (line 86)

Set parameters to pass to action controller constructors

  • access: public
Zend_Controller_Router setParams ( $params)
  • array $params

Implementation of:
Zend_Controller_Router_Interface::setParams()
Set an array of a parameters to pass to helper object constructors

Documentation generated on Thu, 18 Jan 2007 09:58:46 -0800 by phpDocumentor 1.3.1