-
Notifications
You must be signed in to change notification settings - Fork 58
/
muse
executable file
·99 lines (85 loc) · 2.82 KB
/
muse
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/php
<?php
/**
* @package hubzero-cms
* @copyright Copyright (c) 2005-2020 The Regents of the University of California.
* @license http://opensource.org/licenses/MIT MIT
*/
/*
|--------------------------------------------------------------------------
| Check environment
|--------------------------------------------------------------------------
|
| This is only allowed to run in the command line interface.
|
*/
if (php_sapi_name() != 'cli')
{
exit();
}
/*
|--------------------------------------------------------------------------
| Parent Flag
|--------------------------------------------------------------------------
|
| Set flag that this is a parent file.
|
*/
define('_HZEXEC_', 1);
define('DS', DIRECTORY_SEPARATOR);
/*
|--------------------------------------------------------------------------
| Define directories
|--------------------------------------------------------------------------
|
| First thing we need to do is set some constants for the app's directory
| and the path to the parent directory containing the app and core.
|
*/
define('PATH_ROOT', __DIR__);
define('PATH_CORE', PATH_ROOT . '/core');
require_once PATH_CORE . DS . 'bootstrap' . DS . 'paths.php';
/*
|--------------------------------------------------------------------------
| Define CMS version
|--------------------------------------------------------------------------
|
| Pull in the version number. Although just a simple `define()` statement,
| we only want to define it in one place for the CMS and then have every
| application instance pull it in. Easier to maintain!
|
*/
require_once PATH_CORE . DS . 'bootstrap' . DS . 'version.php';
/*
|--------------------------------------------------------------------------
| Load The Framework
|--------------------------------------------------------------------------
|
| Here we will load the framework. We'll keep this is in a
| separate location so we can isolate the creation of an application
| from the actual running of the application with a given request.
|
*/
require_once PATH_CORE . DS . 'bootstrap' . DS . 'autoload.php';
/*
|--------------------------------------------------------------------------
| Load The Application
|--------------------------------------------------------------------------
|
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser.
|
*/
$app = require_once PATH_CORE . DS . 'bootstrap' . DS . 'start.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can simply call the run method,
| which will execute the request and send the response back to
| the client's browser.
|
*/
$app->run();