aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/plugin_api.php
diff options
context:
space:
mode:
Diffstat (limited to 'ratatoeskr/sys/plugin_api.php')
-rw-r--r--ratatoeskr/sys/plugin_api.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/ratatoeskr/sys/plugin_api.php b/ratatoeskr/sys/plugin_api.php
new file mode 100644
index 0000000..e021e15
--- /dev/null
+++ b/ratatoeskr/sys/plugin_api.php
@@ -0,0 +1,36 @@
+<?php
+/*
+ * File: plugin_api.php
+ *
+ * Plugin API contains the plugin base class and other interfaces to Ratatöskr.
+ *
+ * This file is part of Ratatöskr.
+ * Ratatöskr is licensed unter the MIT / X11 License.
+ * See "ratatoeskr/licenses/ratatoeskr" for more information.
+ */
+
+require_once(dirname(__FILE__) . "/db.php");
+
+
+abstract class RatatoeskrPlugin
+{
+ private $id;
+ protected $kvstorage;
+ protected $smarty;
+
+ public function __construct($id)
+ {
+ global $smarty;
+ $this->id = $id;
+ $this->kvstorage = new PluginKVStorage($id);
+ $this->smarty = $smarty;
+ }
+
+ public function get_id() { return $this->id; }
+
+ public function init() {}
+ public function install() {}
+ public function uninstall() {}
+}
+
+?>