Skip to content

Instantly share code, notes, and snippets.

@Darkry
Created August 2, 2011 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Darkry/23f592298dfeae13241f to your computer and use it in GitHub Desktop.
Save Darkry/23f592298dfeae13241f to your computer and use it in GitHub Desktop.
TodoPanel.php
<?php
/**
* My Application bootstrap file.
*/
use Nette\Diagnostics\Debugger,
Nette\Application\Routers\Route;
// Load Nette Framework
$params['libsDir'] = __DIR__ . '/../libs';
require $params['libsDir'] . '/Nette/loader.php';
// Enable Nette Debugger for error visualisation & logging
Debugger::$logDirectory = __DIR__ . '/../log';
Debugger::$strictMode = TRUE;
Debugger::enable();
// Load configuration from config.neon file
$configurator = new Nette\Configurator;
$configurator->container->params += $params;
$configurator->container->params['tempDir'] = __DIR__ . '/../temp';
$container = $configurator->loadConfig(__DIR__ . '/config.neon');
//Environment::loadConfig();
dibi::connect(Nette\Environment::getConfig('database'));
// Setup router
$router = $container->router;
$router[] = new Route('index.php', 'Front:MapView:default', Route::ONE_WAY);
$router[] = new Route('admin/<presenter>/<action>[/<id>]', array(
'module' => 'Admin',
'presenter' => 'Homepage',
'action' => 'default',
));
$router[] = new Route('<presenter>[/<id>]', array(
'module' => 'Front',
'presenter' => 'MapView',
'action' => 'default',
));
/*
Takhle to jde, ale když to odkomentuju spadne ten server, jak jsem psal (Connection reseted)
*/
// Debugger::addPanel(new Panel\Todo(__DIR__));
// Configure and run the application!
$application = $container->application;
//$application->catchExceptions = TRUE;
$application->errorPresenter = 'Error';
$application->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment