public function __construct(Slim $app)
{
$this->app = $app;
$this->singleton('slim', function () use($app) {
return $app;
});
$this->singleton('config', function ($app) {
return new Config($app['slim']);
});
$this['path'] = $app->config('path');
$service_manager = $this;
$app->hook('slim.before', function () use($service_manager) {
$service_manager->boot();
}, 1);
}