From: Evan Coury Date: Fri, 9 Dec 2011 20:16:43 +0000 (-0700) Subject: Update for new module event stuff and update zf2 submodule X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=ba938de7a9a8c2e896551f787589a63075863f54;p=zf2.biz%2Fapplication_blanche.git Update for new module event stuff and update zf2 submodule Also adds the proposed chdir() change per the Dec 7th meeting. --- diff --git a/config/application.config.php b/config/application.config.php index ece654c..9edb86d 100644 --- a/config/application.config.php +++ b/config/application.config.php @@ -1,14 +1,14 @@ array( - realpath(dirname(__DIR__) . '/module'), - realpath(dirname(__DIR__) . '/vendor'), - ), 'modules' => array( 'Application', ), 'module_listener_options' => array( 'config_cache_enabled' => false, - 'cache_dir' => realpath(dirname(__DIR__) . '/data/cache'), + 'cache_dir' => 'data/cache', + 'module_paths' => array( + './module', + './vendor', + ), ), ); diff --git a/public/index.php b/public/index.php index 767893c..b8dc353 100644 --- a/public/index.php +++ b/public/index.php @@ -1,20 +1,20 @@ array())); -$appConfig = include dirname(__DIR__) . '/config/application.config.php'; +$appConfig = include 'config/application.config.php'; -$moduleLoader = new Zend\Loader\ModuleAutoloader($appConfig['module_paths']); -$moduleLoader->register(); +$moduleManager = new Zend\Module\Manager($appConfig['modules']); +$listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']); +$defaultListeners = new Zend\Module\Listener\DefaultListenerAggregate($listenerOptions); -$moduleManager = new Zend\Module\Manager($appConfig['modules']); -$listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']); -$moduleManager->setDefaultListenerOptions($listenerOptions); -$moduleManager->getConfigListener()->addConfigGlobPath(dirname(__DIR__) . '/config/autoload/*.config.php'); +$defaultListeners->getConfigListener()->addConfigGlobPath('config/autoload/*.config.php'); +$moduleManager->events()->attachAggregate($defaultListeners); $moduleManager->loadModules(); // Create application, bootstrap, and run -$bootstrap = new Zend\Mvc\Bootstrap($moduleManager->getMergedConfig()); +$bootstrap = new Zend\Mvc\Bootstrap($defaultListeners->getConfigListener()->getMergedConfig()); $application = new Zend\Mvc\Application; $bootstrap->bootstrap($application); $application->run()->send(); diff --git a/vendor/ZendFramework b/vendor/ZendFramework index b3d72e2..c9bf154 160000 --- a/vendor/ZendFramework +++ b/vendor/ZendFramework @@ -1 +1 @@ -Subproject commit b3d72e224b74563bc9c29c30cb7d42ffa34efad8 +Subproject commit c9bf15469b77f06c048fda5cd707d304bd34650d