Skip to content

Commit

Permalink
Update for latest zf2 changes and update submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDotPro committed Dec 10, 2011
1 parent a3ad72e commit d5e4331
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
13 changes: 6 additions & 7 deletions config/application.config.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?php
return array(
'module_paths' => 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'),
'application_environment' => getenv('APPLICATION_ENV'),
'config_cache_enabled' => false,
'cache_dir' => 'data/cache',
'module_paths' => array(
'./module',
'./vendor',
),
),
);
16 changes: 8 additions & 8 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?php
require_once dirname(__DIR__) . '/vendor/ZendFramework/library/Zend/Loader/AutoloaderFactory.php';
chdir(dirname(__DIR__));
require_once 'vendor/ZendFramework/library/Zend/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory(array('Zend\Loader\StandardAutoloader' => 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();
$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->getConfigListener()->addConfigGlobPath(dirname(__DIR__) . '/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();
2 changes: 1 addition & 1 deletion vendor/ZendFramework
Submodule ZendFramework updated from a2777d to c9bf15

0 comments on commit d5e4331

Please sign in to comment.