Class Zend_Controller_Router_Rewrite

Description

Ruby routing based Router.

Located in /Controller/Router/Rewrite.php (line 43)

Zend_Controller_Router_Abstract
   |
   --Zend_Controller_Router_Rewrite
Variable Summary
Method Summary
Variables
Zend_Controller_Router_Route_Interface $_currentRoute = null (line 61)

Currently matched route

  • access: protected
array $_routes = array() (line 55)

Array of routes to match against

  • access: protected
boolean $_useDefaultRoutes = true (line 49)

Whether or not to use default routes

  • access: protected

Inherited Variables

Inherited from Zend_Controller_Router_Abstract

Zend_Controller_Router_Abstract::$_frontController
Zend_Controller_Router_Abstract::$_invokeParams
Methods
addConfig (line 124)

Create routes out of Zend_Config configuration

Example INI: routes.archive.route = "archive/:year/*" routes.archive.defaults.controller = archive routes.archive.defaults.action = show routes.archive.defaults.year = 2000 routes.archive.reqs.year = "\d+"

routes.news.type = "Zend_Controller_Router_Route_Static" routes.news.route = "news" routes.news.defaults.controller = "news" routes.news.defaults.action = "list"

And finally after you have created a Zend_Config with above ini: $router = new Zend_Controller_Router_Rewrite(); $router->addConfig($config, 'routes');

  • throws: Zend_Controller_Router_Exception
  • access: public
void addConfig ( $config, string $section)
  • Zend_Config $config: Configuration object
  • string $section: Name of the config section containing route's definitions
addDefaultRoutes (line 66)

Add default routes which are used to mimic basic router behaviour

  • access: protected
void addDefaultRoutes ()
addRoute (line 86)

Add route to the route chain

  • access: public
void addRoute (string $name, Zend_Controller_Router_Route_Interface $route)
addRoutes (line 95)

Add routes to the route chain

  • access: public
void addRoutes (array $routes)
  • array $routes: Array of routes with names as keys and routes as values
getCurrentRoute (line 194)

Retrieve a currently matched route

  • return: Route object
  • throws: Zend_Controller_Router_Exception
  • access: public
getCurrentRouteName (line 208)

Retrieve a name of currently matched route

  • return: Route object
  • throws: Zend_Controller_Router_Exception
  • access: public
getRoute (line 180)

Retrieve a named route

  • return: Route object
  • throws: Zend_Controller_Router_Exception
  • access: public
Zend_Controller_Router_Route_Interface getRoute (string $name)
  • string $name: Name of the route
getRoutes (line 221)

Retrieve an array of routes added to the route chain

  • return: All of the defined routes
  • access: public
array getRoutes ()
hasRoute (line 168)

Check if named route exists

  • access: public
boolean hasRoute (string $name)
  • string $name: Name of the route
removeDefaultRoutes (line 158)

Remove all standard default routes

  • access: public
void removeDefaultRoutes (string 0, Zend_Controller_Router_Route_Interface 1)
removeRoute (line 145)

Remove a route from the route chain

  • throws: Zend_Controller_Router_Exception
  • access: public
void removeRoute (string $name)
  • string $name: Name of the route
route (line 233)

Find a matching route to the current PATH_INFO and inject returning values to the Request object.

  • return: Request object
  • throws: Zend_Controller_Router_Exception
  • access: public
_setRequestParams (line 259)
  • access: protected
void _setRequestParams ( $request,  $params)
  • $request
  • $params

Inherited Methods

Inherited From Zend_Controller_Router_Abstract

 Zend_Controller_Router_Abstract::__construct()
 Zend_Controller_Router_Abstract::clearParams()
 Zend_Controller_Router_Abstract::getFrontController()
 Zend_Controller_Router_Abstract::getParam()
 Zend_Controller_Router_Abstract::getParams()
 Zend_Controller_Router_Abstract::setFrontController()
 Zend_Controller_Router_Abstract::setParam()
 Zend_Controller_Router_Abstract::setParams()

Documentation generated on Sun, 27 May 2007 23:27:17 -0700 by phpDocumentor 1.3.2