-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.php
29 lines (24 loc) · 886 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/* Initialises the application. */
require 'vendor/autoload.php';
/* Set paths */
Flight::set('path.root', __DIR__);
Flight::set('path.public', __DIR__ . '/public');
Flight::set('path.src', __DIR__ . '/src');
Flight::set('path.views', __DIR__ . '/src/views');
Flight::set('path.res', __DIR__ . '/src/public/res');
/* Include paths */
Flight::path(__DIR__ . '/src/controllers');
Flight::path(__DIR__ . '/src/rsr');
Flight::path(__DIR__ . '/src/rsr/io');
// Flight::path(__DIR__ . '/src/models');
/* Twig initial setup. */
$loader = new Twig_Loader_Filesystem(Flight::get('path.views'));
$twigConfig = array(
// 'cache' => '__DIR__ . '/data/cache',
// 'cache' => false,
'debug' => true
);
Flight::register('view', 'Twig_Environment', array($loader, $twigConfig), function($twig) {
$twig->addExtension(new Twig_Extension_Debug()); // Add the debug extension
});