getConfigListener()->addConfigGlobPath("config/autoload/{global,$env}.config.php"); $moduleManager = new Zend\Module\Manager($appConfig['modules']); $moduleManager->events()->attachAggregate($defaultListeners); $moduleManager->loadModules(); // Create application, bootstrap, and run $bootstrap = new Zend\Mvc\Bootstrap($defaultListeners->getConfigListener()->getMergedConfig()); $application = new Zend\Mvc\Application; $bootstrap->bootstrap($application); $application->run()->send();