2011年1月13日星期四

[fw-mvc] Re: replace routes

Works now :)

class App_Plugins_Route extends Zend_Controller_Plugin_ErrorHandler
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
$frontController = Zend_Controller_Front::getInstance();
$dispatcher = $frontController->getDispatcher();

if( ! $dispatcher->isDispatchable($request))
{
$front = Zend_Controller_Front::getInstance();
$router = $front->getRouter();

// create new routes
// $route = new Zend_Controller_Router_Route(...);
// $router->addRoute('route1', $route);

$router->route($request);
}

return $request;
}
}


thanks for the help!
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/replace-routes-tp3214502p3215933.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: