Código PHP:
No default controller directory registered with front controller
Código PHP:
resources.modules = ""
Código PHP:
resources.modules[] = ""
Código PHP:
resources.frontController.params.prefixDefaultModule = ""
Código PHP:
resources.frontcontroller.params.prefixDefaultModule = true
Tengo la siguiente estructura:
Código PHP:
-| application
---| configs
-----| application.php
---| forms
---| languagues
---| modules
-----| front
-------| controllers
---------| IndexController.php
---------| ...
-------| template
---------| layout.phtml
-------| views
---------| scripts
-----------| index
-------------| index.phtml
-----------| ...
---------| Bootstrap.php
------| admin
-------| ...
-----| Bootstrap.php
Código PHP:
[production]
; Debug Options
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
; Include path
includePaths.library = APPLICATION_PATH_LIBRARY
; Bootstrap
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
; Namespace
appnamespace = "GC"
; Bootstrap resources:
; -> Front Controller With Modules
resources.frontController.prefixDefaultModule = 0
resources.frontController.moduleDirectory = APPLICATION_PATH_MODULE
resources.frontController.controllerDirectory.default = APPLICATION_PATH_MODULE "/front/controllers"
resources.frontController.moduleControllerDirectoryName = "controllers"
resources.frontController.defaultModule = "front"
resources.frontController.params.displayExceptions = 0
resources.modules = []
;resources.
; -> Layout Front
resources.layout.layoutPath = APPLICATION_PATH_MODULE "/front/template/"
resources.view.helperPath = APPLICATION_PATH_MODULE "/front/views/helpers"
resources.frontController.controllerDirectory.default = APPLICATION_PATH_MODULE "/front/controllers"
; -> Layout Admin
admin.resources.layout.layoutPath = APPLICATION_PATH_MODULE "/admin/template/"
admin.resources.view.helperPath = APPLICATION_PATH_MODULE “/admin/views/helpers”
admin.resources.frontController.controllerDirectory.gcmanager = APPLICATION_PATH_MODULE "/admin/controllers"
Código PHP:
class Bootstrap extends Zend_Application_Module_Bootstrap
{
protected function _initStart()
{
echo 'Application/Bootstrap';
}
}
Código PHP:
class Front_Bootstrap extends Zend_Application_Module_Bootstrap
{
protected function _initStart()
{
echo 'Front/Bootstrap';
}
}
Código PHP:
class Admin_Bootstrap extends Zend_Application_Module_Bootstrap
{
protected function _initStart()
{
echo 'Admin/Bootstrap';
}
}
Código PHP:
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define enviroment on current application
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Configuracion de recursos para el Boostrap
define('APPLICATION_PATH_SETUP', APPLICATION_PATH . '/setup');
// Libreria Zend
define('APPLICATION_PATH_CORE', APPLICATION_PATH . '/../../../../Zend/library');
// Librerias Propias
define('APPLICATION_PATH_LIBRARY', APPLICATION_PATH . '/../library');
// Path de los modelos
define('APPLICATION_PATH_MODEL', APPLICATION_PATH . '/models');
// Path Modulos
define('APPLICATION_PATH_MODULE', APPLICATION_PATH . '/modules');
// Archivo de configuracion
define('APPLICATION_PATH_CONFIG', APPLICATION_PATH . '/configs');
// Idioma de la aplicacion
define('APPLICATION_PATH_LANGUAGE', APPLICATION_PATH . '/languages');
// Path donde se guardan los temporales de la aplicacion, sesions, bd, pages, etc
define('APPLICATION_PATH_CACHE', APPLICATION_PATH . '/../data/cache');
// Path Publico
define('APPLICATION_PATH_PUBLIC', APPLICATION_PATH . '/../public');
// Include paths
set_include_path(
implode(
PATH_SEPARATOR,
array(
realpath(APPLICATION_PATH_SETUP),
realpath(APPLICATION_PATH_CORE),
realpath(APPLICATION_PATH_LIBRARY),
realpath(APPLICATION_PATH_MODEL)
)
)
);
/** Zend_Application */
require_once 'Zend/Application.php';
try{
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH_CONFIG . '/application.ini'
);
// Run Application
$application->bootstrap()
->run();
} catch(Zend_Exception $e){
print '<pre>' . $e->getMessage() . '</pre>';
}