Hola, mira yo nos soy un guru y nada de eso en zend de hecho estoy en proceso de aprendizaje pero t recomiendo que dentro de application/configs, pongas tu application.ini. Yo lo tengo algo asi:
Código:
[production]
resources.modules [] = ""
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.layout.layoutpath = APPLICATION_PATH "/layouts"
resources.layout.layout = layout
;Modules config
default.resources.layout.layoutPath = APPLICATION_PATH "/modules/default/layouts"
default.resources.layout.layout = layout
admin.resources.layout.layoutPath = APPLICATION_PATH "/modules/admin/layouts"
admin.resources.layout.layout = layout
resources.db.adapter = PDO_mysql
resources.db.params.host = localhost
resources.db.params.username = user
resources.db.params.password = passs
resources.db.params.dbname = name_database
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
mi bootstrap.php:
Código PHP:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
private $_acl = null;
protected function _initAutoload() {
$modelLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH.'/modules/default'));
if(Zend_Auth::getInstance()->hasIdentity()) {
Zend_Registry::set('level', Zend_Auth::getInstance()->getStorage()->read()->level);
} else {
Zend_Registry::set('level', 'guests');
}
$this->_acl = new Model_ControlAcl;
$this->_auth = Zend_Auth::getInstance();
$fc = Zend_Controller_Front::getInstance();
$fc->registerPlugin(new Plugin_AccessCheck($this->_acl));
return $modelLoader;
}
function _initViewHelpers() {
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->setHelperPath(APPLICATION_PATH.'/helpers', '');
$view->doctype('HTML4_STRICT');
$view->headMeta()->appendHttpEquiv('Content-type', 'text/html;charset=utf-8')
->appendName('description', 'Using view helpers in Zend_view');
$view->headTitle()->setSeparator(' - ')
->headTitle('Titulo');
$navContainerConfig = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
$navContainer = new Zend_Navigation($navContainerConfig);
$view->navigation($navContainer)->setAcl($this->_acl)->setRole(Zend_Registry::get('level'));
$view = new Zend_View();
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
/*$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);*/
}
protected function _initLocale(){
$locale = new Zend_Locale();
$locale->setLocale('es_ES');
Zend_Registry::set('Zend_Locale', $locale); // la registramos para su futuro uso en el resto de la aplicación
}
protected function _initPlugins(){
$this->bootstrap('frontController');
$plugin = new My_LayoutPlugin();
$this->frontController->registerPlugin($plugin);
//$this->frontController->throwExceptions(true);
}
}
Trata de ordenar a lo que Zend te recomienda y ya estas a un paso de que logres tu próposito. Sigue adelante.
Saludos,