1 | <?php |
||
21 | class Install extends Base |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Base module installer model |
||
26 | * @var \gplcart\modules\base\models\Install $installer |
||
27 | */ |
||
28 | protected $install_model; |
||
29 | |||
30 | /** |
||
31 | * Module class instance |
||
32 | * @var \gplcart\core\Module $module |
||
33 | */ |
||
34 | protected $module; |
||
35 | |||
36 | /** |
||
37 | * @param Module $module |
||
38 | * @param InstallModel $install_model |
||
39 | */ |
||
40 | public function __construct(Module $module, InstallModel $install_model) |
||
47 | |||
48 | /** |
||
49 | * Performs initial system installation. Step 0 |
||
50 | * @param array $data |
||
51 | * @param \gplcart\core\Database $db |
||
52 | * @return array |
||
53 | */ |
||
54 | public function install(array $data, $db) |
||
67 | |||
68 | /** |
||
69 | * Performs installation via classic web UI |
||
70 | * @return array |
||
71 | */ |
||
72 | protected function installHttp() |
||
95 | |||
96 | /** |
||
97 | * Install in CLI mode |
||
98 | */ |
||
99 | protected function installCli() |
||
111 | |||
112 | /** |
||
113 | * Process step 1 in CLI mode |
||
114 | * @throws UnexpectedValueException |
||
115 | */ |
||
116 | protected function installCliStep1() |
||
126 | |||
127 | /** |
||
128 | * Process step 2 in CLI mode |
||
129 | * @throws UnexpectedValueException |
||
130 | */ |
||
131 | protected function installCliStep2() |
||
149 | |||
150 | /** |
||
151 | * Precess step 3 in CLI mode |
||
152 | * @throws UnexpectedValueException |
||
153 | */ |
||
154 | protected function installCliStep3() |
||
163 | |||
164 | /** |
||
165 | * Installs required modules. Step 1 |
||
166 | * @param array $data |
||
167 | * @param \gplcart\core\Database $db |
||
168 | * @return array |
||
169 | */ |
||
170 | public function installModules(array $data, $db) |
||
197 | |||
198 | /** |
||
199 | * Install a demo-content. Step 2 |
||
200 | * @param array $data |
||
201 | * @param \gplcart\core\Database $db |
||
202 | * @return array |
||
203 | */ |
||
204 | public function installDemo(array $data, $db) |
||
229 | |||
230 | /** |
||
231 | * Performs final tasks. Step 3 |
||
232 | * @param array $data |
||
233 | * @param \gplcart\core\Database $db |
||
234 | * @return array |
||
235 | */ |
||
236 | public function installFinish(array $data, $db) |
||
256 | |||
257 | /** |
||
258 | * Returns an array of demo content options |
||
259 | * @return array |
||
260 | */ |
||
261 | protected function getDemoOptions() |
||
271 | |||
272 | /** |
||
273 | * Configure module settings |
||
274 | */ |
||
275 | protected function configureModules() |
||
280 | |||
281 | /** |
||
282 | * Configure Device module settings |
||
283 | */ |
||
284 | protected function configureModuleDevice() |
||
294 | |||
295 | /** |
||
296 | * Configure Google Analytics Report module settings |
||
297 | */ |
||
298 | protected function configureModuleGaReport() |
||
314 | |||
315 | } |
||
316 |