1 | <?php |
||
11 | class Loader { |
||
12 | /** @var ConfigParser */ |
||
13 | protected $parser; |
||
14 | |||
15 | /** @var string[] list of enabled plugins */ |
||
16 | protected $plugins; |
||
17 | /** @var string current template */ |
||
18 | protected $template; |
||
19 | |||
20 | /** |
||
21 | * Loader constructor. |
||
22 | * @param ConfigParser $parser |
||
23 | * @triggers PLUGIN_CONFIG_PLUGINLIST |
||
24 | */ |
||
25 | public function __construct(ConfigParser $parser) { |
||
33 | |||
34 | /** |
||
35 | * Read the settings meta data |
||
36 | * |
||
37 | * Reads the main file, plugins and template settings meta data |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | public function loadMeta() { |
||
70 | |||
71 | /** |
||
72 | * Read the default values |
||
73 | * |
||
74 | * Reads the main file, plugins and template defaults |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | public function loadDefaults() { |
||
107 | |||
108 | /** |
||
109 | * Reads the language strings |
||
110 | * |
||
111 | * Only reads extensions, main one is loaded the usual way |
||
112 | * |
||
113 | * @return array |
||
114 | */ |
||
115 | public function loadLangs() { |
||
142 | |||
143 | /** |
||
144 | * Read the local settings |
||
145 | * |
||
146 | * @return array |
||
147 | */ |
||
148 | public function loadLocal() { |
||
152 | |||
153 | /** |
||
154 | * Read the protected settings |
||
155 | * |
||
156 | * @return array |
||
157 | */ |
||
158 | public function loadProtected() { |
||
162 | |||
163 | /** |
||
164 | * Read the config values from the given files |
||
165 | * |
||
166 | * @param string[] $files paths to config php's |
||
167 | * @return array |
||
168 | */ |
||
169 | protected function loadConfigs($files) { |
||
176 | |||
177 | /** |
||
178 | * Read settings file from an extension |
||
179 | * |
||
180 | * This is used to read the settings.php files of plugins and templates |
||
181 | * |
||
182 | * @param string $file php file to read |
||
183 | * @param string $type should be 'plugin' or 'tpl' |
||
184 | * @param string $extname name of the extension |
||
185 | * @return array |
||
186 | */ |
||
187 | protected function loadExtensionMeta($file, $type, $extname) { |
||
206 | |||
207 | /** |
||
208 | * Read a default file from an extension |
||
209 | * |
||
210 | * This is used to read the default.php files of plugins and templates |
||
211 | * |
||
212 | * @param string $file php file to read |
||
213 | * @param string $type should be 'plugin' or 'tpl' |
||
214 | * @param string $extname name of the extension |
||
215 | * @return array |
||
216 | */ |
||
217 | protected function loadExtensionConf($file, $type, $extname) { |
||
233 | |||
234 | /** |
||
235 | * Read the language file of an extension |
||
236 | * |
||
237 | * @param string $dir directory of the extension |
||
238 | * @param string $type should be 'plugin' or 'tpl' |
||
239 | * @param string $extname name of the extension |
||
240 | * @return array |
||
241 | */ |
||
242 | protected function loadExtensionLang($dir, $type, $extname) { |
||
267 | } |
||
268 |