1 | <?php |
||
16 | class Core { |
||
17 | use Singleton; |
||
18 | /** |
||
19 | * Is object constructed |
||
20 | * @var bool |
||
21 | */ |
||
22 | protected $constructed = false; |
||
23 | /** |
||
24 | * @var mixed[] |
||
25 | */ |
||
26 | protected $config = []; |
||
27 | /** |
||
28 | * Loading of base system configuration, creating of missing directories |
||
29 | */ |
||
30 | protected function construct () { |
||
84 | /** |
||
85 | * Fill `$_POST` and `$_REQUEST` when there is request method different than POST or if Content-Type is JSON |
||
86 | */ |
||
87 | protected function fill_post_request () { |
||
107 | /** |
||
108 | * Load main.json config file and return array of it contents |
||
109 | * |
||
110 | * @return array |
||
111 | * |
||
112 | * @throws ExitException |
||
113 | */ |
||
114 | protected function load_config () { |
||
129 | /** |
||
130 | * Getting of base configuration parameter |
||
131 | * |
||
132 | * @param string $item |
||
133 | * |
||
134 | * @return false|string |
||
135 | */ |
||
136 | function get ($item) { |
||
139 | /** |
||
140 | * Setting of base configuration parameter (available only at object construction) |
||
141 | * |
||
142 | * @param string $item |
||
143 | * @param mixed $value |
||
144 | */ |
||
145 | function set ($item, $value) { |
||
150 | /** |
||
151 | * Getting of base configuration parameter |
||
152 | * |
||
153 | * @param string $item |
||
154 | * |
||
155 | * @return false|string |
||
156 | */ |
||
157 | function __get ($item) { |
||
160 | /** |
||
161 | * Setting of base configuration parameter (available only at object construction) |
||
162 | * |
||
163 | * @param string $item |
||
164 | * @param mixed $value |
||
165 | */ |
||
166 | function __set ($item, $value) { |
||
169 | } |
||
170 |