0

I'm using Zend Framework 1.12 and I would like to bootstrap my view in the application.ini only.

Current setup:

resources.view[] = ""
resources.view.encoding = "UTF-8"
resources.view.basePath = APPLICATION_PATH "/views/"
resources.view.doctype = "XHTML1_STRICT"
resources.view.contentType = "text/html; charset=UTF-8"
resources.view.helperPath.My_View_Helper = APPLICATION_PATH"/views/helpers"

By this setup, I can use (for example) built-in navigation helper. I must attach following to Bootstrap:

protected function _initViewHelpers() {

        $this->bootstrap('view');
        $view = $this->getResource('view');

        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
        $viewRenderer->setView($view);
        $view->env = APPLICATION_ENV;


    }

Any possibility to move it to ini file ?

Ivan
  • 315
  • 1
  • 3
  • 16
  • Is it utterly necessary for it to be done in .ini ? I use Zend 1.12 as well, and to do what you are doing I use a Plugin. – Chayemor Jun 17 '13 at 22:30
  • it's finally not really necessary, I'm just curious how these things are working.. – Ivan Jun 18 '13 at 08:50
  • I don´t really know how to do it through .ini but if you are interested I can show you the Plugin way. – Chayemor Jun 18 '13 at 10:18

0 Answers0