forked from o2system/o2system
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.php
More file actions
131 lines (120 loc) · 3.38 KB
/
cli.php
File metadata and controls
131 lines (120 loc) · 3.38 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/usr/bin/php -q
<?php
/**
* This file is part of the O2System PHP Framework package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Steeve Andrian Salim
* @copyright Copyright (c) Steeve Andrian Salim
*/
// ------------------------------------------------------------------------
define( 'STARTUP_TIME', microtime( true ) );
define( 'STARTUP_MEMORY', memory_get_usage( true ) );
/*
*---------------------------------------------------------------
* APPLICATION ENVIRONMENT
*---------------------------------------------------------------
*
* You can load different configurations depending on your
* current environment. Setting the environment also influences
* things like logging and error reporting.
*
* This can be set to anything, but default usage is:
*
* development
* testing
* production
*
* NOTE: If you change these, also change the error_reporting() code below
*
*/
if ( ! defined( 'ENVIRONMENT' ) ) {
/**
* Environment Stage
*
* @value DEVELOPMENT|TESTING|PRODUCTION
*/
define( 'ENVIRONMENT', 'DEVELOPMENT' );
/**
* Environment Debug Stage
*
* @value DEVELOPER|TESTER|PUBLIC
*/
$_ENV[ 'DEBUG_STAGE' ] = 'DEVELOPER';
}
/*
*---------------------------------------------------------------
* APP FOLDER NAME
*---------------------------------------------------------------
*
* Application folder name.
*
* NO TRAILING SLASH!
*/
if ( ! defined( 'DIR_APP' ) ) {
define( 'DIR_APP', 'app' );
}
/*
*---------------------------------------------------------------
* CACHE FOLDER NAME
*---------------------------------------------------------------
*
* Caching folder name.
*
* NO TRAILING SLASH!
*/
if ( ! defined( 'DIR_CACHE' ) ) {
define( 'DIR_CACHE', 'cache' );
}
/*
*---------------------------------------------------------------
* STORAGE FOLDER NAME
*---------------------------------------------------------------
*
* Storage folder name.
*
* NO TRAILING SLASH!
*/
if ( ! defined( 'DIR_STORAGE' ) ) {
define( 'DIR_STORAGE', 'storage' );
}
/*
*---------------------------------------------------------------
* PUBLIC FOLDER NAME
*---------------------------------------------------------------
*
* Accessible folder by public.
*
* NO TRAILING SLASH!
*/
if ( ! defined( 'DIR_PUBLIC' ) ) {
define( 'DIR_PUBLIC', 'public' );
}
/*
*---------------------------------------------------------------
* DEFINE ROOT PATH
*---------------------------------------------------------------
*/
define( 'PATH_ROOT', dirname( __FILE__ ) . DIRECTORY_SEPARATOR );
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__ . '/vendor/autoload.php';
/*
* ------------------------------------------------------
* STARTUP O2SYSTEM
* ------------------------------------------------------
*/
if ( class_exists( 'O2System\Framework', false ) ) {
O2System\Framework::getInstance();
}