summaryrefslogtreecommitdiff
path: root/inc/remote.php
diff options
context:
space:
mode:
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;
}