forked from zendframework/modules.zendframework.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for latest zf2 changes and update submodule
- Loading branch information
1 parent
a3ad72e
commit d5e4331
Showing
3 changed files
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
), | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
Submodule ZendFramework
updated
from a2777d to c9bf15