Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * My Application bootstrap file.
- */
- use Nette\Diagnostics\Debugger,
- Nette\Application\Routers\Route,
- Nette\Application\Routers\RouteList,
- Nette\Caching\Cache;
- // Load Nette Framework
- $params['libsDir'] = __DIR__ . '/../libs';
- require $params['libsDir'] . '/Nette/loader.php';
- //require $params['libsDir'] . '/Nette-minified/nette.min.php';
- // Enable Nette Debugger for error visualisation & logging
- Debugger::$logDirectory = __DIR__ . '/../log';
- Debugger::$strictMode = true;
- Debugger::enable(Debugger::DEVELOPMENT);
- // For debugging reasons only
- function dp($_val = '') {
- Debugger::dump($_val);
- die();exit();
- }
- // Load configuration from config.neon file
- $configurator = new Nette\Config\Configurator;
- $configurator->container->params += $params;
- $container = $configurator->loadConfig(__DIR__ . '/config.neon');
- // Session
- $container->session->setExpiration('+ 14 days');
- // Setup router
- $router = $container->router;
- $router[] = $container->getService('databaseRoute');
- $router[] = $frontRouter = new RouteList('Front');
- $frontRouter[] = new Route('index', 'Homepage:default', Route::ONE_WAY);
- // Configure and run the application!
- $application = $container->application;
- $application->catchExceptions = false;
- $application->errorPresenter = 'Error';
- $application->run();
Advertisement
Add Comment
Please, Sign In to add comment