-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·48 lines (38 loc) · 1.45 KB
/
index.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
//*********************************//
// ** Initialize the constants ** //
//*********************************//
define('CORE_PATH', 'core/');
define('CONFIG_PATH', 'config/');
define('CONTROLLERS_PATH', 'controllers/');
define('ERRORS_PATH', 'errors/');
//*********************************//
// **** Initialize the system **** //
//*********************************//
require_once(CORE_PATH.'System.php');
require_once(CORE_PATH.'Bootstrap.php');
require_once(CORE_PATH.'Error.php');
require_once(CORE_PATH.'ConfigsManager.php');
require_once(CORE_PATH.'Logger.php');
require_once(CORE_PATH.'Log.php');
require_once(CORE_PATH.'Output.php');
require_once(CORE_PATH.'URI.php');
use gladiator\core\System;
$system = System::getInstance();
//*********************************//
// **** Call the plugins **** //
//*********************************//
//*******************************//
// **** Call the request **** //
//*******************************//
$system -> executeRequest();
//*******************************//
// ***** Print the output ***** //
//*******************************//
echo $system -> getOutput();
//********************************************************//
// **** If any error was threw, save the log in file **** //
//********************************************************//
if( $system -> getConfigsManager() -> getConfig( 'automatic_save' ) ){
$system->getLogger()->saveLogsInFile();
}