-
Notifications
You must be signed in to change notification settings - Fork 17
/
bootstrap.php
39 lines (28 loc) · 1.36 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
<?php
// ------------------------------------------------------------
// Load composer
// ------------------------------------------------------------
require "vendor/autoload.php";
// ------------------------------------------------------------
// Define constant(s)
// ------------------------------------------------------------
defined('NIMBLE_ROOT') OR define('NIMBLE_ROOT', __DIR__);
defined('NIMBLE_APP') OR define('NIMBLE_APP', NIMBLE_ROOT."/app");
defined('NIMBLE_STORAGE') OR define('NIMBLE_STORAGE', __DIR__."/storage");
defined('NIMBLE_PUBLIC') OR define('NIMBLE_PUBLIC', NIMBLE_ROOT."/public");
defined('NIMBLE_RESOURCES') OR define('NIMBLE_RESOURCES', NIMBLE_ROOT."/resources");
// ------------------------------------------------------------
// Load the container and plug all things
// ------------------------------------------------------------
$app = new Illuminate\Container\Container;
// ------------------------------------------------------------
// Load the helpers
// ------------------------------------------------------------
require NIMBLE_APP.'/helpers.php';
// ------------------------------------------------------------
// Load the components
// ------------------------------------------------------------
$components = require NIMBLE_APP.'/components.php';
foreach ($components as $component) {
(new $component($app))->setUp();
}