-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
bootstrap.php
31 lines (25 loc) · 818 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
30
31
<?php
// set some directory names that we will need
if (!defined('APP_ROOT')) {
define('APP_ROOT', __DIR__ . '/');
}
if (!defined('LIB_ROOT')) {
define('LIB_ROOT', APP_ROOT . 'lib/');
}
// include our autoloader
include LIB_ROOT . 'psr0.autoloader.php';
// Also include our Composer stuff
include APP_ROOT . 'vendor/.composer/autoload.php';
// We are using Twig for templating
$loader = new \Twig_Loader_Filesystem(APP_ROOT . 'templates');
$twig = new \Twig_Environment($loader, array('debug' => true));
$twig->addExtension(new \Twig_Extensions_Extension_Debug());
// Initalize our Dependency Injection Container
$container = new \Pimple();
$container['db_connection'] = function ($c) {
return new \PDO(
'pgsql:host=localhost;dbname=ibl_stats',
'stats',
'st@ts=Fun'
);
};