Пример #1
0
<?php

/**
 * Hook, filter, etc should goes here
 */
/**
 * error handling sample
 */
$app->error(function () use($app) {
    $Controller = new \ErrorController();
    $Controller->error();
});
$app->notFound(function () use($app) {
    $Controller = new \ErrorController();
    $Controller->notFound();
});
/**************************************** CONFIGURATIONS ********************/
$app->config('css.version', '0.1');
$app->config('js.version', '0.1');
$app->config('fe.asset.forceless', false);
$app->config('fe.asset.css', array('bootstrap.min.css', 'app.less'));
$app->config('fe.asset.js', array('bootstrap.min.js'));
/**\.************************************** CONFIGURATIONS ********************/
/**************************************** HOOCKS ********************/
/**
 * hook per le lingue
 * in questo modo nelle rotte nn serve metter nessun riferimento alla lingua
 */
$app->hook('slim.before', function () use($app) {
    $availableLangs = $app->config('languages');
    $env = $app->environment();