X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=public%2Findex.php;h=60730da5372373d877e84461c51e31d4d63056c7;hb=491bd52235289a2eeddc865797b338b95e6269be;hp=9c388bef43491949dcb20255d8ca971669a12f17;hpb=a4421c44d9026edfe0c462f8e13cc8234efa401a;p=zf2.biz%2Fapplication_blanche.git diff --git a/public/index.php b/public/index.php index 9c388be..60730da 100644 --- a/public/index.php +++ b/public/index.php @@ -1,30 +1,20 @@ array())); -$appConfig = include __DIR__ . '/../configs/application.config.php'; +$appConfig = include 'config/application.config.php'; -$moduleLoader = new Zend\Loader\ModuleAutoloader($appConfig['module_paths']); -$moduleLoader->register(); +$listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']); +$defaultListeners = new Zend\Module\Listener\DefaultListenerAggregate($listenerOptions); +$defaultListeners->getConfigListener()->addConfigGlobPath('config/autoload/*.config.php'); $moduleManager = new Zend\Module\Manager($appConfig['modules']); -$listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']); -$moduleManager->setDefaultListenerOptions($listenerOptions); +$moduleManager->events()->attachAggregate($defaultListeners); $moduleManager->loadModules(); // Create application, bootstrap, and run -$bootstrap = new Zend\Mvc\Bootstrap($moduleManager->getMergedConfig()); -$application = new Zend\Mvc\Application; +$bootstrap = new Zend\Mvc\Bootstrap($defaultListeners->getConfigListener()->getMergedConfig()); +$application = new Zend\Mvc\Application; $bootstrap->bootstrap($application); $application->run()->send();