Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | namespace phpbb\install; |
| 15 | |
| 16 | /** |
| 17 | * Interface for installer tasks |
| 18 | */ |
| 19 | interface task_interface |
| 20 | { |
| 21 | /** |
| 22 | * Returns the number of steps the task contains |
| 23 | * |
| 24 | * This is a helper method to provide a better progress bar for the front-end. |
| 25 | * |
| 26 | * @return int The number of steps that the task contains |
| 27 | */ |
| 28 | public static function get_step_count(); |
| 29 | |
| 30 | /** |
| 31 | * Checks if the task is essential to install phpBB or it can be skipped |
| 32 | * |
| 33 | * Note: Please note that all the non-essential modules have to implement check_requirements() |
| 34 | * method. |
| 35 | * |
| 36 | * @return bool true if the task is essential, false otherwise |
| 37 | */ |
| 38 | public function is_essential(); |
| 39 | |
| 40 | /** |
| 41 | * Checks requirements for the tasks |
| 42 | * |
| 43 | * Note: Only need to be implemented for non-essential tasks, as essential tasks |
| 44 | * requirements should be checked in the requirements install module. |
| 45 | * |
| 46 | * @return bool true if the task's requirements are met |
| 47 | */ |
| 48 | public function check_requirements(); |
| 49 | |
| 50 | /** |
| 51 | * Executes the task |
| 52 | */ |
| 53 | public function run(); |
| 54 | |
| 55 | /** |
| 56 | * Returns the language key of the name of the task |
| 57 | * |
| 58 | * @return string |
| 59 | */ |
| 60 | public function get_task_lang_name(); |
| 61 | } |