Is it possible to use zend_application and zend_bootstrap as non mvc? I'd like to use them but without the zend_view.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
yes you can.
there is several way if you don't want to use zend view
don't invoke run() method of zend application, so request will not hit your zend controller, and no zend view will be instantiated :
$application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' );
$application->bootstrap();
disable view render & layout at controller
$this->_helper->viewRenderer->setNoRender(true); $this->_helper->layout()->disableLayout();
回答2:
Yes, just strip the appropriate resource parts from your application.ini
Further details
- Zend Application - Theory of Operation