X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=public%2Findex.php;h=9c388bef43491949dcb20255d8ca971669a12f17;hb=07f9a36fe6140f21229a07b3f1342edbe7cd8da1;hp=cd83a90ede8a84758204edd2e8b162358f3db38b;hpb=a7f22ba984ddda1d8d01ee027fa76b73b1074407;p=zf2.biz%2Fgalerie.git diff --git a/public/index.php b/public/index.php index cd83a90..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,14 +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 -$bootstrapClass = $appConfig['bootstrap_class']; -$bootstrap = new $bootstrapClass($moduleManager); +$bootstrap = new Zend\Mvc\Bootstrap($moduleManager->getMergedConfig()); $application = new Zend\Mvc\Application; $bootstrap->bootstrap($application); $application->run()->send();