Zend application and bootstrap as non mvc

2019-07-28 05:32发布

Is it possible to use zend_application and zend_bootstrap as non mvc? I'd like to use them but without the zend_view.

2条回答
劳资没心,怎么记你
2楼-- · 2019-07-28 06:08

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();
    
查看更多
Luminary・发光体
3楼-- · 2019-07-28 06:29

Yes, just strip the appropriate resource parts from your application.ini

Further details

查看更多
登录 后发表回答