forked from vrana/mvc-exception-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
19 lines (14 loc) · 794 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
require_once './libs/Nette/loader.php';
require_once './libs/dibi/dibi.min.php';
define('APP_DIR', dirname(__FILE__));
Debug::enable();
$application = Environment::getApplication();
$application->errorPresenter = 'Error';
dibi::connect(array('driver' => 'sqlite3', 'file' => APP_DIR . '/models/data/blog.sqlite'));
// dibi::connect(array('driver' => 'sqlite3', 'file' => APP_DIR . '/models/data/blog-destroyed.sqlite'));
$router = $application->getRouter();
$router[] = new Route('robots.txt', array('presenter' => 'Feed', 'action' => 'robots'));
$router[] = new Route('sitemap.xml', array('presenter' => 'Feed', 'action' => 'sitemap'));
$router[] = new Route('<presenter>/<action>/<id>/', array('presenter' => 'Homepage', 'action' => 'default', 'id' => NULL));
$application->run();