zendframework/zf2 — pull request #4000 by devosc (2013-03-10 22:52:01+00:00)
Title: MVC Bootstap Config

If the structure of the ZF2 application is flattened with no modules, chances are, there is no need to use a module manager. This PR provides a MVC\Bootstrap\ConfigManager which replicates ModuleManager\ConfigListener, but does not require a ModuleManager and is not event based.

Example usage
```php
$options = array(
'cache_dir' => 'data/cache',
'config_cache_enabled' => true,
'config_cache_key' => 'cache-config.php',
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
)
);

$cm = new ConfigManager(new ConfigOptions($options));

$cm->addConfigStaticPaths((array) $config);

//Just like ConfigListener::onLoadModulesPost
$config = $cm->loadMergedConfig();

$smConfig = isset($config['service_manager']) ? $config['service_manager'] : array();

$serviceManager = new ServiceManager(new ServiceManagerConfig($smConfig));
$serviceManager->setService('Config', $config);

$application = $serviceManager->get('Application');

$application->bootstrap();
```