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 | * @throws ExitException |
||
31 | */ |
||
32 | protected function construct () { |
||
90 | /** |
||
91 | * Load main.json config file and return array of it contents |
||
92 | * |
||
93 | * @return array |
||
94 | * |
||
95 | * @throws ExitException |
||
96 | */ |
||
97 | protected function load_config () { |
||
112 | /** |
||
113 | * Getting of base configuration parameter |
||
114 | * |
||
115 | * @param string $item |
||
116 | * |
||
117 | * @return false|string |
||
118 | */ |
||
119 | function get ($item) { |
||
122 | /** |
||
123 | * Setting of base configuration parameter (available only at object construction) |
||
124 | * |
||
125 | * @param string $item |
||
126 | * @param mixed $value |
||
127 | */ |
||
128 | function set ($item, $value) { |
||
133 | /** |
||
134 | * Getting of base configuration parameter |
||
135 | * |
||
136 | * @param string $item |
||
137 | * |
||
138 | * @return false|string |
||
139 | */ |
||
140 | function __get ($item) { |
||
143 | /** |
||
144 | * Setting of base configuration parameter (available only at object construction) |
||
145 | * |
||
146 | * @param string $item |
||
147 | * @param mixed $value |
||
148 | */ |
||
149 | function __set ($item, $value) { |
||
152 | } |
||
153 |