public function register(Application $app)
{
$app['config'] = $app->share(function ($app) {
$config = new Config($app);
$config->initialize();
return $config;
});
$app['config.environment'] = $app->share(function ($app) {
$appPath = $app['resources']->getPath('app');
$viewPath = $app['resources']->getPath('view');
$environment = new Environment($appPath, $viewPath, $app['cache'], $app['extend.action'], Bolt\Version::VERSION);
return $environment;
});
$app['config.validator'] = $app->share(function ($app) {
$validator = new ConfigValidator($app['controller.exception'], $app['config'], $app['resources']);
return $validator;
});
$app['config.listener'] = $app->share(function ($app) {
return new ConfigListener($app);
});
if (!isset($app['config.pre_boot'])) {
$this->preBoot($app['resources']);
$app['config.pre_boot'] = true;
}
}