routeStartup() is called before
routeShutdown() is called after the router
finishes routing the request.
dispatchLoopStartup() is called before
preDispatch() is called before an action is
dispatched by the
dispatcher. This callback allows for proxy or
filter behavior. By altering the request and resetting its
dispatched flag (via
postDispatch() is called after an action is
dispatched by the
dispatcher. This callback allows for proxy or
filter behavior. By altering the request and resetting its
dispatched flag (via
dispatchLoopShutdown() is called after
getRequest() and getResponse() methods,
respectively.
routeStartup() called
\n"); } public function routeShutdown(Zend_Controller_Request_Abstract $request) { $this->getResponse() ->appendBody("routeShutdown() called
\n"); } public function dispatchLoopStartup( Zend_Controller_Request_Abstract $request) { $this->getResponse() ->appendBody("dispatchLoopStartup() called
\n"); } public function preDispatch(Zend_Controller_Request_Abstract $request) { $this->getResponse() ->appendBody("preDispatch() called
\n"); } public function postDispatch(Zend_Controller_Request_Abstract $request) { $this->getResponse() ->appendBody("postDispatch() called
\n"); } public function dispatchLoopShutdown() { $this->getResponse() ->appendBody("dispatchLoopShutdown() called
\n"); } } $front = Zend_Controller_Front::getInstance(); $front->setControllerDirectory('/path/to/controllers') ->setRouter(new Zend_Controller_Router_Rewrite()) ->registerPlugin(new MyPlugin()); $front->dispatch(); ]]>routeShutdown() called
dispatchLoopStartup() called
preDispatch() called
postDispatch() called
dispatchLoopShutdown() called
]]>getPlugin($class) allows you to retrieve a
plugin by class name. If no plugins match, it returns false.
If more than one plugin of that class is registered, it
returns an array.
getPlugins() retrieves the entire plugin stack.
unregisterPlugin($plugin) allows you to remove
a plugin from the stack. You may pass a plugin object, or
the class name of the plugin you wish to unregister. If you
pass the class name, any plugins of that class will be
removed.