-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
47 lines (38 loc) · 1.46 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* LCARS is a framework for the RPG - ST - DNG
*
* @package LCARS
* @version 0.1
* @author Andreas Dziemba
* @license DNG-Bluegreen License
* @copyright 2016 - 2017 Star Trek - Die neue Grenze
* @link http://www.die-neue-grenze.de
*/
use core\classes\loader\Autoloader;
use core\classes\loader\ModuleClassLoader;
use core\classes\LCARS;
use core\classes\statistics\LoadTimer;
require_once(COREDIR.'classes'.DIRECTORY_SEPARATOR.'statistics'.DIRECTORY_SEPARATOR.'LoadTimer.php');
LoadTimer::instance();
//Import needed Classes for Autoloader pattern
require_once(COREDIR.'classes'.DIRECTORY_SEPARATOR.'loader'.DIRECTORY_SEPARATOR.'Autoloader.php');
require_once(COREDIR.'interfaces'.DIRECTORY_SEPARATOR.'loader'.DIRECTORY_SEPARATOR.'ClassLoaderInterface.php');
require_once(COREDIR.'classes'.DIRECTORY_SEPARATOR.'loader'.DIRECTORY_SEPARATOR.'ModuleClassLoader.php');
/**
* Set error reporting and display errors settings. You will want to change these when in production.
*/
error_reporting(-1);
ini_set('display_errors', 1);
//### Initialize Autoloader and register core Loader
$autoloader = new Autoloader();
$autoloader->addLoader(new ModuleClassLoader('core', COREDIR));
// load ModuleClassLoader from the modules
require_once MODULEDIR.'bootstrap.php';
$loaders = $autoloader->getAllLoaders();
$autoloader->register();
//####### END AUTOLOADER
//### Load LCARS BASE APP
$lcars = LCARS::instance();
$lcars->init();
//####### END LCARS