-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
38 lines (27 loc) · 958 Bytes
/
Copy pathindex.php
File metadata and controls
38 lines (27 loc) · 958 Bytes
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
32
33
34
35
36
37
38
<?php
/**
* @type array $config
* @type array $autoload
*/
session_start();
ob_start('ob_gzhandler');
define('ROOT_PATH', dirname(__FILE__));
require_once ROOT_PATH . '/System/AutoLoader.php';
require_once ROOT_PATH . '/Config/configuration.php';
require_once ROOT_PATH . '/Config/database.php';
require_once ROOT_PATH . '/Config/services.php';
spl_autoload_register('Skeleton\System\Autoloader::loader');
if ('development' === $config['mode']) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
} else {
error_reporting(0);
ini_set('display_errors', 0);
}
require_once ROOT_PATH . '/Infrastructure/inc.db.php';
$registry = new \Skeleton\System\Registry();
$registry->db = $db;
$registry->services = new \Skeleton\System\Containers\ServiceContainer($classes, $services);
$registry->template = new \Skeleton\System\Template($registry);
$registry->router = new \Skeleton\System\Router($registry);
$registry->router->render();