ACC SHELL
<?php
/**
* My Application bootstrap file.
*/
use Nette\Diagnostics\Debugger,
Nette\Application\Routers\Route;
// Load Nette Framework
require LIBS_DIR . '/Nette/loader.php';
// Enable Nette Debugger for error visualisation & logging
Debugger::$logDirectory = __DIR__ . '/../log';
Debugger::$strictMode = TRUE;
Debugger::enable();
// Configure application
$configurator = new Nette\Config\Configurator;
$configurator->setCacheDirectory(__DIR__ . '/../temp');
// Enable RobotLoader - this will load all classes automatically
$configurator->createRobotLoader()
->addDirectory(APP_DIR)
->addDirectory(LIBS_DIR)
->register();
// Create Dependency Injection container from config.neon file
$container = $configurator->loadConfig(__DIR__ . '/config/config.neon');
// Opens already started session
if ($container->session->exists()) {
$container->session->start();
}
// Setup router
$router = $container->router;
//$router[] = new Route('index.php', 'Homepage:default', Route::ONE_WAY);
//$router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
$router[] = new Route('[<lang cs|en|de>/]<presenter>/<action>[/<webalizedName>]', array(
'lang' => 'cs',
'presenter' => 'Homepage',
'action' => 'default'
));
// Configure and run the application!
$application = $container->application;
//$application->catchExceptions = TRUE;
$application->errorPresenter = 'Error';
$application->run();
ACC SHELL 2018