Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
abstract_requirements_module.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb\install\module\requirements;
15
16 use phpbb\install\exception\user_interaction_required_exception;
17 use phpbb\install\module_base;
18
19 /**
20 * Base class for requirements installer module
21 */
22 abstract class abstract_requirements_module extends module_base
23 {
24 public function run()
25 {
26 $tests_passed = true;
27 foreach ($this->task_collection as $name => $task)
28 {
29 // Check if we can run the task
30 if (!$task->is_essential() && !$task->check_requirements())
31 {
32 continue;
33 }
34
35 if ($this->allow_progress_bar)
36 {
37 $this->install_config->increment_current_task_progress();
38 }
39
40 $test_result = $task->run();
41 $tests_passed = ($tests_passed) ? $test_result : false;
42 }
43
44 // Module finished, so clear task progress
45 $this->install_config->set_finished_task(0);
46
47 // Check if tests have failed
48 if (!$tests_passed)
49 {
50 // If requirements are not met, exit form installer
51 // Set up UI for retesting
52 $this->iohandler->add_user_form_group('', array(
53 'install' => array(
54 'label' => 'RETEST_REQUIREMENTS',
55 'type' => 'submit',
56 ),
57 ));
58
59 // Send the response and quit
60 throw new user_interaction_required_exception();
61 }
62 }
63
64 /**
65 * {@inheritdoc}
66 */
67 public function get_step_count()
68 {
69 return 0;
70 }
71 }
72