X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=public%2Findex.php;h=9c388bef43491949dcb20255d8ca971669a12f17;hb=a4421c44d9026edfe0c462f8e13cc8234efa401a;hp=edf3990be787f42da1173a3905468e599e445392;hpb=b38a3586fd6b4b73640daf12ed4222d246823ff0;p=zf2.biz%2Fapplication_blanche.git diff --git a/public/index.php b/public/index.php index edf3990..9c388be 100644 --- a/public/index.php +++ b/public/index.php @@ -5,6 +5,7 @@ defined('APPLICATION_ENV') // Ensure ZF is on the include path set_include_path(implode(PATH_SEPARATOR, array( + realpath(__DIR__ . '/../library'), realpath(__DIR__ . '/../library/ZendFramework/library'), get_include_path(), ))); @@ -17,13 +18,13 @@ $appConfig = include __DIR__ . '/../configs/application.config.php'; $moduleLoader = new Zend\Loader\ModuleAutoloader($appConfig['module_paths']); $moduleLoader->register(); -$moduleManager = new Zend\Module\Manager( - $appConfig['modules'], - new Zend\Module\ManagerOptions($appConfig['module_manager_options']) -); +$moduleManager = new Zend\Module\Manager($appConfig['modules']); +$listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']); +$moduleManager->setDefaultListenerOptions($listenerOptions); +$moduleManager->loadModules(); // Create application, bootstrap, and run -$bootstrap = new Zend\Mvc\Bootstrap($moduleManager); +$bootstrap = new Zend\Mvc\Bootstrap($moduleManager->getMergedConfig()); $application = new Zend\Mvc\Application; $bootstrap->bootstrap($application); $application->run()->send();