-
-
Save Darkry/23f592298dfeae13241f to your computer and use it in GitHub Desktop.
TodoPanel.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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