Zend application and bootstrap as non mvc

为君一笑 提交于 2019-12-11 10:09:48

问题


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

  1. 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();

  2. 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


来源:https://stackoverflow.com/questions/3980159/zend-application-and-bootstrap-as-non-mvc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!