X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=public%2Findex.php;h=8007083f0f643b66fa25a967dd5c0cc02784bb81;hb=5f74cfff0bae0d568803d58858a610b0afbff7d3;hp=60730da5372373d877e84461c51e31d4d63056c7;hpb=491bd52235289a2eeddc865797b338b95e6269be;p=zf2.biz%2Fgalerie.git diff --git a/public/index.php b/public/index.php index 60730da..8007083 100644 --- a/public/index.php +++ b/public/index.php @@ -1,13 +1,18 @@ array())); +Zend\Loader\AutoloaderFactory::factory(); + +if (!($env = getenv('APPLICATION_ENV'))) { + $env = 'local'; +} $appConfig = include 'config/application.config.php'; $listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']); $defaultListeners = new Zend\Module\Listener\DefaultListenerAggregate($listenerOptions); -$defaultListeners->getConfigListener()->addConfigGlobPath('config/autoload/*.config.php'); +$defaultListeners->getConfigListener()->addConfigGlobPath("config/autoload/{module.*,global,$env,local}.config.php"); + $moduleManager = new Zend\Module\Manager($appConfig['modules']); $moduleManager->events()->attachAggregate($defaultListeners);