Lines Matching defs:method
20 * 'method.remoteName' => array(
24 * 'name' => 'method name in class',
26 * 'public' => 1/0 - method bypass default group check (used by login)
27 * ['doc' = 'method documentation'],
32 * core methods begin by a 'dokuwiki' or 'wiki' followed by a . and the method name itself.
35 * plugin methods are formed like 'plugin.<plugin name>.<method name>'.
105 foreach ($methods as $method => $call) {
106 $this->pluginMethods["plugin.$pluginName.$method"] = $call;
114 * Call a method via remote api.
116 * @param string $method name of the method to call.
117 * @param array $args arguments to pass to the given method
118 * @return mixed result of method call, must be a primitive type.
121 public function call($method, $args = [])
130 if (!isset($methods[$method])) {
133 $this->ensureAccessIsAllowed($methods[$method]);
137 return $methods[$method]($args);
158 * Check if the current user is allowed to call the given method
160 * @param ApiCall $method
162 * @throws AccessDeniedException Thrown when the user is not allowed to call the method
164 public function ensureAccessIsAllowed(ApiCall $method)
170 if ($method->isPublic()) return; // public methods are always allowed
178 throw new AccessDeniedException('server error. not authorized to call method', -32604);