public function forceExit() { if (APPLICATION_ENV != "testing") { Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer')->setNoRender(true); } $plugins = Zend_Controller_Front::getInstance()->getPlugins(); $broker = new Zend_Controller_Plugin_Broker(); $broker->setRequest(Zend_Controller_Front::getInstance()->getRequest()); $broker->setResponse(Zend_Controller_Front::getInstance()->getResponse()); foreach ($plugins as $index => $plugin) { $broker->registerPlugin($plugin, $index); } try { $broker->postDispatch($broker->getRequest()); } catch (Exception $e) { \App::log()->crit('Error executing "postDispatch" after stream'); \App::log()->crit($e); } try { $broker->dispatchLoopShutdown(); } catch (Exception $e) { \App::log()->crit('Error executing "dispatchLoopShutdown" after stream'); \App::log()->crit($e); } if (APPLICATION_ENV !== 'testing') { exit; } }