Class Zend_Controller_Router_Rewrite

Description

Ruby routing based Router.

Located in /Zend/Controller/Router/Rewrite.php (line 40)

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

Currently matched route

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

Array of routes to match against

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

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

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');

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

Add default routes which are used to mimic basic router behaviour

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

Add route to the route chain

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

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

Retrieve a currently matched route

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

Retrieve a name of currently matched route

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

Retrieve a named route

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

Retrieve an array of routes added to the route chain

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

Check if named route exists

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

Remove all standard default routes

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

Remove a route from the route chain

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

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

  • return: Request object
  • access: public
  • throws: Zend_Controller_Router_Exception
_setRequestParams (line 254)
  • 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 Wed, 21 Feb 2007 11:58:55 -0800 by phpDocumentor 1.3.1