2 chdir(dirname(__DIR__));
3 require_once 'vendor/ZendFramework/library/Zend/Loader/AutoloaderFactory.php';
4 Zend\Loader\AutoloaderFactory::factory(array('Zend\Loader\StandardAutoloader' => array()));
6 $appConfig = include 'config/application.config.php';
8 $moduleManager = new Zend\Module\Manager($appConfig['modules']);
9 $listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']);
10 $defaultListeners = new Zend\Module\Listener\DefaultListenerAggregate($listenerOptions);
12 $defaultListeners->getConfigListener()->addConfigGlobPath('config/autoload/*.config.php');
13 $moduleManager->events()->attachAggregate($defaultListeners);
14 $moduleManager->loadModules();
16 // Create application, bootstrap, and run
17 $bootstrap = new Zend\Mvc\Bootstrap($defaultListeners->getConfigListener()->getMergedConfig());
18 $application = new Zend\Mvc\Application;
19 $bootstrap->bootstrap($application);
20 $application->run()->send();