summaryrefslogtreecommitdiff
path: root/inc/remote.php
diff options
context:
space:
mode:
authorDominik Eckelmann <deckelmann@gmail.com>2011-11-23 20:25:58 +0100
committerDominik Eckelmann <deckelmann@gmail.com>2011-11-23 20:25:58 +0100
commit457ad80ad7c53870fc033997bfbf36e3904f9c4e (patch)
treee4cfc5271b9451ad086d9bd531c94d27384a0518 /inc/remote.php
parent402e0951b7e3ccf567702515bfe0b09cca8a5a93 (diff)
downloadrpg-457ad80ad7c53870fc033997bfbf36e3904f9c4e.tar.gz
rpg-457ad80ad7c53870fc033997bfbf36e3904f9c4e.tar.bz2
introduced remote api class
Diffstat (limited to 'inc/remote.php')
-rw-r--r--inc/remote.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/inc/remote.php b/inc/remote.php
index ea5e23af3..13a38aa17 100644
--- a/inc/remote.php
+++ b/inc/remote.php
@@ -17,6 +17,7 @@ if (!defined('DOKU_INC')) die();
* 'args' => array(
* 'type' => 'string|int|...',
* )
+ * 'return' => 'type'
* )
* )
*
@@ -102,8 +103,20 @@ class RemoteAPI {
*/
public function getPluginMethods() {
if ($this->pluginMethods === null) {
- // TODO: find plugin methods
$this->pluginMethods = array();
+ $plugins = plugin_list('remote');
+
+ foreach ($plugins as $pluginName) {
+ $plugin = plugin_load('remote', $pluginName);
+ if (!is_subclass_of($plugin, 'DokuWiki_Remote_Plugin')) {
+ throw new RemoteException("Plugin $pluginName dose not implement DokuWiki_Remote_Plugin");
+ }
+
+ $methods = $plugin->_getMethods();
+ foreach ($methods as $method => $meta) {
+ $this->pluginMethods["plugin.$pluginName.$method"] = $meta;
+ }
+ }
}
return $this->pluginMethods;
}