Commit e359370b authored by Taddeüs Kroes's avatar Taddeüs Kroes

Added some comments

parent 9cd85a0c
......@@ -20,7 +20,7 @@ bind_textdomain_codeset($domain, 'UTF-8');
textdomain($domain);
/*
* Config
* Load configs
*/
$config = load_config('config.json');
......@@ -33,23 +33,27 @@ if (isset($config['default_timezone']))
define('ROOT_URL', $config['root_url']);
/*
* Set up app with custom Latte view
*/
$view = new Slim\Latte\LatteView(array(
'path' => __DIR__ . '/templates',
'cache' => __DIR__ . '/.cache/latte',
'configure_engine' => function ($engine) {
// support for {_'...'} syntax in latte templates
$engine->addFilter('translate', function($s) {
return gettext($s);
});
// install {form} macro's from Bootstrap form renderer
$engine->onCompile[] = function ($latte) {
$compiler = $latte->getCompiler();
Instante\Bootstrap3Renderer\Latte\FormMacros::install($compiler);
};
}
));
$app = new Slim\Slim(array(
'view' => $view
));
$app = new Slim\Slim(compact('view'));
/*
* Database setup
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment