-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
52 lines (39 loc) · 1.25 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
49
50
51
52
<?php
session_start();
$start = microtime(true);
$_POST['username'] = 'mlegore';
$_POST['password'] = 'coolbeans';
//Load the base classes required to run
require_once 'base/Base.php';
require_once 'base/common.php';
require_once 'base/App.php';
require_once 'base/Loader.php';
//Retrieve the URI string and initialize the App
$uri = getUri();
$host = getHost();
$app = new App($host,$uri);
$uri = $app -> uriPath();
//Initialize the loader class
$load = Loader::instance();
//Load the config class
$config = $load -> core_class('config');
//Load the hooks class
$hooks = $load -> core_class('hooks');
//Load the plugin class
$load -> file('Plugin.php','extend');
//Load the Model, View, and Controller classes class
$load -> file('Model.php','extend');
$load -> file('View.php','extend');
$load -> file('Controller.php','extend');
//Load the router class
$router = $load -> core_class('router');
//Load some config files
$config -> loadConfig('config'); //Loads config.php in global then app dir (if they exist)
$config -> loadConfig('db','database'); //Loads database configuration
//Load the default plugins
$base = Base::instance();
$base -> loadPlugins();
$router -> route($host,$uri);
//$config -> loadConfig('db','database');
echo ' '.(microtime(true) - $start);
?>