register(new Sikofitt\Config\ConfigServiceProvider(), [ 'config.path' => $app->getConfDirectory(), ]); $app->register (new TwigServiceProvider(), [ 'twig.path' => APP_ROOT . 'app/views', ]); $app['conf'] = function ($app) { }; $app->register (new WhoopsServiceProvider()); $app->register (new \Silex\Provider\AssetServiceProvider()); $app->register (new \Silex\Provider\MonologServiceProvider()); $app->register (new \Silex\Provider\VarDumperServiceProvider()); $app->register (new \Silex\Provider\HttpKernelServiceProvider()); $app['json.decoder'] = function ($app) { return new Webmozart\Json\JsonDecoder(); }; $app['json.encoder'] = function ($app) { return new Webmozart\Json\JsonEncoder(); }; $app['json.validator'] = function ($app) { return new Webmozart\Json\JsonValidator(); }; $app->get ('/', function () use ($app) { $jsonErrors = []; $resume = new ResumeBuilder($app); $json = $resume->toJson(['array' => 'neat'], ['app' => $app, 'file' => 'resume.json']); //$app['config']->set ('app.name', 'Groovey'); $decoded = []; $app->config('app.value', 'myvalue'); dump($app->config('app')); return $app['twig']->render ('base.html.twig', ['resume' => $decoded, 'errors' => $jsonErrors]); }); $app->run ();