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 | */ |
||
24 | public function __construct(ConfigParser $parser) { |
||
30 | |||
31 | /** |
||
32 | * Read the settings meta data |
||
33 | * |
||
34 | * Reads the main file, plugins and template settings meta data |
||
35 | * |
||
36 | * @return array |
||
37 | */ |
||
38 | public function loadMeta() { |
||
67 | |||
68 | /** |
||
69 | * Read the default values |
||
70 | * |
||
71 | * Reads the main file, plugins and template defaults |
||
72 | * |
||
73 | * @return array |
||
74 | */ |
||
75 | public function loadDefaults() { |
||
104 | |||
105 | /** |
||
106 | * Read the local settings |
||
107 | * |
||
108 | * @return array |
||
109 | */ |
||
110 | public function loadLocal() { |
||
114 | |||
115 | /** |
||
116 | * Read the protected settings |
||
117 | * |
||
118 | * @return array |
||
119 | */ |
||
120 | public function loadProtected() { |
||
124 | |||
125 | /** |
||
126 | * Read the config values from the given files |
||
127 | * |
||
128 | * @param string[] $files paths to config php's |
||
129 | * @return array |
||
130 | */ |
||
131 | protected function loadConfigs($files) { |
||
138 | |||
139 | /** |
||
140 | * Read settings file from an extension |
||
141 | * |
||
142 | * This is used to read the settings.php files of plugins and templates |
||
143 | * |
||
144 | * @param string $file php file to read |
||
145 | * @param string $type should be 'plugin' or 'tpl' |
||
146 | * @param string $extname name of the extension |
||
147 | * @return array |
||
148 | */ |
||
149 | protected function loadExtensionMeta($file, $type, $extname) { |
||
168 | |||
169 | /** |
||
170 | * Read a default file from an extension |
||
171 | * |
||
172 | * This is used to read the default.php files of plugins and templates |
||
173 | * |
||
174 | * @param string $file php file to read |
||
175 | * @param string $type should be 'plugin' or 'tpl' |
||
176 | * @param string $extname name of the extension |
||
177 | * @return array |
||
178 | */ |
||
179 | protected function loadExtensionConf($file, $type, $extname) { |
||
195 | } |
||
196 |