-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathloader.php
executable file
·33 lines (26 loc) · 1.01 KB
/
loader.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
32
33
<?
/// logic unrelated to a specific request
/** @file */
#Tool, used by config
require_once $_ENV['systemFolder'].'tool/Tool.php';
#used by autoloader
require_once $_ENV['systemFolder'].'tool/Arrays.php';
require_once $_ENV['systemFolder'].'tool/Hook.php';
require_once $_ENV['systemFolder'].'tool/CommonTraits.php';
#Config setting
require_once $_ENV['systemFolder'].'tool/Config.php';
Config::init();
#Autoloader
require_once $_ENV['systemFolder'].'tool/Autoload.php';
$autoload = Autoload::init(null,$_ENV['autoloadIncludes']);
spl_autoload_register(array($autoload,'auto'));
#composer autload
if(is_file($_ENV['composerFolder'].'autoload.php')){
require_once $_ENV['composerFolder'].'autoload.php';
}
set_error_handler($_ENV['errorHandler'],$_ENV['errorsHandled']);
set_exception_handler($_ENV['exceptionHandler']);
Config::loadUserFiles($_ENV['preRoute']);
#pre session request handling; for file serving and such.
require_once $_ENV['systemFolder'].'tool/control/Route.php';
\control\Route::handle($_SERVER['REQUEST_URI']);