aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/plugin_api.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2011-12-27 00:05:49 +0100
committerKevin Chabowski <kevin@kch42.de>2011-12-27 00:05:49 +0100
commitcb172742c78517baf6a79b52f980b0b9dcb81274 (patch)
treed06f730060fa71645ee6f2fdec5ae4dcde1fae94 /ratatoeskr/sys/plugin_api.php
parent722a900eaaeb6204ef180e7095fc0a30a48b4d4a (diff)
downloadratatoeskr-cms-cb172742c78517baf6a79b52f980b0b9dcb81274.tar.gz
ratatoeskr-cms-cb172742c78517baf6a79b52f980b0b9dcb81274.tar.bz2
ratatoeskr-cms-cb172742c78517baf6a79b52f980b0b9dcb81274.zip
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).
Diffstat (limited to 'ratatoeskr/sys/plugin_api.php')
-rw-r--r--ratatoeskr/sys/plugin_api.php14
1 files changed, 8 insertions, 6 deletions
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() {}