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 ?