summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorMichael Klier <chi@chimeric.de>2008-08-24 10:04:57 +0200
committerMichael Klier <chi@chimeric.de>2008-08-24 10:04:57 +0200
commitbb32615dd0cedc85fbbec5f1c76a3e57e40e318b (patch)
tree4108cead2076dd4324a87c93b33f40067da9828e /lib/exe
parentdfd13e55ad5658529ad92eb78ba4481a3a8ffc58 (diff)
downloadrpg-bb32615dd0cedc85fbbec5f1c76a3e57e40e318b.tar.gz
rpg-bb32615dd0cedc85fbbec5f1c76a3e57e40e318b.tar.bz2
XMLRPC: new event XMLRPC_CALLBACK_REGISTER
By using this event, action plugins can register their own callback methods in DokuWikis XML-RPC server, and extend it's functionality. The event data is the server instance. Plugins can also remove already registered callbacks or replace them with their own methods. darcs-hash:20080824080457-23886-b49b897592ce6717f0980f6044bae2d51fd73336.gz
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/xmlrpc.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index 4c2e0f011..226e35861 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -149,6 +149,22 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
'Returns a struct with infos about the attachment.'
);
+ /**
+ * Trigger XMLRPC_CALLBACK_REGISTER, action plugins can use this event
+ * to extend the XMLRPC interface and register their own callbacks.
+ *
+ * Event data:
+ * The XMLRPC server object:
+ *
+ * $event->data->addCallback() - register a callback, the second
+ * paramter has to be of the form "plugin:<pluginname>:<plugin
+ * method>"
+ *
+ * $event->data->callbacks - an array which holds all awaylable
+ * callbacks
+ */
+ trigger_event('XMLRPC_CALLBACK_REGISTER', $this);
+
$this->serve();
}