From cb172742c78517baf6a79b52f980b0b9dcb81274 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Tue, 27 Dec 2011 00:05:49 +0100 Subject: Rewritten Settings class and added atexit() to plugin API. Settings now does not load/save values automatically any more (to save SQL queries). Settings will be loaded at startup and saved at the end. There is also only one instance possible now (singleton). --- ratatoeskr/sys/plugin_api.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'ratatoeskr/sys/plugin_api.php') diff --git a/ratatoeskr/sys/plugin_api.php b/ratatoeskr/sys/plugin_api.php index f34a42a..a6f14d4 100644 --- a/ratatoeskr/sys/plugin_api.php +++ b/ratatoeskr/sys/plugin_api.php @@ -15,15 +15,15 @@ require_once(dirname(__FILE__) . "/../frontend.php"); /* * Constant: APIVERSION - * The current API version (1). + * The current API version (2). */ -define("APIVERSION", 1); +define("APIVERSION", 2); /* * Array: $api_compat * Array of API versions, this version is compatible to (including itself). */ -$api_compat = array(1); +$api_compat = array(1, 2); $url_handlers = array(); /* @@ -184,12 +184,14 @@ abstract class RatatoeskrPlugin /* * Functions: Functions that are called at special events * - * init - Will be called after plugin is loaded. You should register your stuff here. - * install - Will be called after installation. If your plugin needs to initialize some database stuff or generate files, this is the right function. + * init - Will be called after plugin is loaded. You should register your stuff here. + * atexit - Will be called, when Ratatöskr will exit. + * install - Will be called after installation. If your plugin needs to initialize some database stuff or generate files, this is the right function. * uninstall - Will be called during uninstallation. If you used the install function you should undo your custom installation stuff. - * update - Will be called after your plugin was updated to a new version. + * update - Will be called after your plugin was updated to a new version. */ public function init() {} + public function atexit() {} public function install() {} public function uninstall() {} public function update() {} -- cgit v1.2.3-70-g09d2