From 8155205ae7a5ec27ff3058137513fc480d7ee6c5 Mon Sep 17 00:00:00 2001 From: MateBartus Date: Fri, 17 Apr 2015 23:17:23 +0200 Subject: [ticket/13740] Implementation of the new installer framework [ci skip] PHPBB3-13740 --- phpBB/install/module_interface.php | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 phpBB/install/module_interface.php (limited to 'phpBB/install/module_interface.php') diff --git a/phpBB/install/module_interface.php b/phpBB/install/module_interface.php new file mode 100644 index 0000000000..e0ec4e4347 --- /dev/null +++ b/phpBB/install/module_interface.php @@ -0,0 +1,56 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\install; + +/** + * Interface for installer modules + * + * An installer module is a task collection which executes installer tasks. + */ +interface module_interface +{ + /** + * Checks if the execution of the module is essential to install phpBB or it can be skipped + * + * Note: Please note that all the non-essential modules have to implement check_requirements() + * method. + * + * @return bool true if the module is essential, false otherwise + */ + public function is_essential(); + + /** + * Checks requirements for the tasks + * + * Note: Only need to be implemented for non-essential tasks, as essential tasks + * requirements should be checked in the requirements install module. + * + * @return bool true if the task's requirements are met + */ + public function check_requirements(); + + /** + * Executes the task + * + * @return null + */ + public function run(); + + /** + * Returns the number of tasks in the module + * + * @return int + */ + public function get_task_count(); +} -- cgit v1.2.1