-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
43 lines (32 loc) · 882 Bytes
/
index.php
File metadata and controls
43 lines (32 loc) · 882 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
39
40
41
42
<?php
/**
* Created by PhpStorm.
* User: vesel
* Date: 05.11.2015
* Time: 18:55
*/
mb_internal_encoding("utf-8");
spl_autoload_register("autoload");
session_start();
KeyConfigLoader::selectFile("main");
require_once("dependencies.php");
if(KeyConfigLoader::getValue("auto-index-libraries") == "true")
LibLoader::indexLibraries();
if(KeyConfigLoader::getValue("auto-load-libraries") == "true")
LibLoader::loadAll();
if(KeyConfigLoader::getValue("auto-index-layouts") == "true")
LayoutManager::indexLayouts();
$router = new RouterController();
$router->process($_SERVER['REQUEST_URI']);
$router->createView();
function autoload($class) {
if(strpos($class, "Controller") !== false) {
require_once("controllers/$class.php");
} else {
require_once("models/$class.php");
}
}
function kill($var) {
var_dump($var);
die;
}