aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/extension/interface.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/extension/interface.php')
-rw-r--r--phpBB/includes/extension/interface.php39
1 files changed, 37 insertions, 2 deletions
diff --git a/phpBB/includes/extension/interface.php b/phpBB/includes/extension/interface.php
index 40a5a066a3..7d0ecd72c7 100644
--- a/phpBB/includes/extension/interface.php
+++ b/phpBB/includes/extension/interface.php
@@ -16,12 +16,47 @@ if (!defined('IN_PHPBB'))
}
/**
+* The interface extension meta classes have to implement to run custom code
+* on enable/disable/purge.
*
* @package extension
*/
interface phpbb_extension_interface
{
- public function enable();
+ /**
+ * enable_step is executed on enabling an extension until it returns false.
+ *
+ * Calls to this function can be made in subsequent requests, when the
+ * function is invoked through a webserver with a too low max_execution_time.
+ *
+ * @param mixed $old_state The return value of the previous call
+ * of this method, or false on the first call
+ * @return mixed Returns false after last step, otherwise
+ * temporary state which is passed as an
+ * argument to the next step
+ */
+ public function enable_step($old_state);
+
+ /**
+ * Disables the extension.
+ *
+ * Must be a quick operation, that finishes within max_execution_time.
+ *
+ * @return null
+ */
public function disable();
- public function purge();
+
+ /**
+ * purge_step is executed on purging an extension until it returns false.
+ *
+ * Calls to this function can be made in subsequent requests, when the
+ * function is invoked through a webserver with a too low max_execution_time.
+ *
+ * @param mixed $old_state The return value of the previous call
+ * of this method, or false on the first call
+ * @return mixed Returns false after last step, otherwise
+ * temporary state which is passed as an
+ * argument to the next step
+ */
+ public function purge_step($old_state);
}