-
Notifications
You must be signed in to change notification settings - Fork 4
/
IJR_CallbackDefines.php
224 lines (187 loc) · 9.17 KB
/
IJR_CallbackDefines.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<?php
/**
* Defines callback functions
*
* @author Magnus Wolf mwolf2706@googlemail.com
*/
class IJR_CallbackDefines {
private $methods = array();
private $obj = array();
private function defineWikiMethods()
{
$this->obj['method'] = 'dokuwiki.getVersion';
$this->obj['callback'] = 'getVersion';
$this->obj['args'] = array('string');
$this->obj['help'] = 'Returns the running DokuWiki version.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'dokuwiki.login';
$this->obj['callback'] = 'this:login';
$this->obj['args'] = array('integer','string','string');
$this->obj['help'] = 'Tries to login with the given credentials and sets auth cookies.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'dokuwiki.getPagelist';
$this->obj['callback'] = 'this:readNamespace';
$this->obj['args'] = array('string','struct');
$this->obj['help'] = 'List all pages within the given namespace.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'dokuwiki.getTime';
$this->obj['callback'] = 'time';
$this->obj['args'] = array('int');
$this->obj['help'] = 'Return the current time at the wiki server.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'dokuwiki.getTitle';
$this->obj['callback'] = 'this:getTitle';
$this->obj['args'] = array('string');
$this->obj['help'] = 'Get wiki title.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'dokuwiki.appendPage';
$this->obj['callback'] = 'this:appendPage';
$this->obj['args'] = array('string', 'string', 'struct');
$this->obj['help'] = 'Appends text to a Wiki Page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'dokuwiki.setLocks';
$this->obj['callback'] = 'this:setLocks';
$this->obj['args'] = array('struct');
$this->obj['help'] = 'Lock or unlock pages.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getPage';
$this->obj['callback'] = 'this:rawPage';
$this->obj['args'] = array('string','string');
$this->obj['help'] = 'Get the raw Wiki text of page, latest version.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getPageVersion';
$this->obj['callback'] = 'this:rawPage';
$this->obj['args'] = array('string', 'string');
$this->obj['help'] = 'Get the raw Wiki text of page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getPageHTML';
$this->obj['callback'] = 'this:htmlPage';
$this->obj['args'] = array('string','string');
$this->obj['help'] = 'Return page in rendered HTML, latest version.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getPageHTMLVersion';
$this->obj['callback'] = 'this:htmlPage';
$this->obj['args'] = array('string','string');
$this->obj['help'] = 'Return page in rendered HTML.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getAllPages';
$this->obj['callback'] = 'this:listPages';
$this->obj['args'] = array('struct');
$this->obj['help'] = 'Returns a list of all pages. The result is an array of utf8 pagenames.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getAttachments';
$this->obj['callback'] = 'this:listAttachments';
$this->obj['args'] = array('string', 'struct');
$this->obj['help'] = 'Returns a list of all media files.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getBackLinks';
$this->obj['callback'] = 'this:listBackLinks';
$this->obj['args'] = array('struct','string');
$this->obj['help'] = 'Returns the pages that link to this page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getPageInfo';
$this->obj['callback'] = 'this:pageInfo';
$this->obj['args'] = array('struct','string');
$this->obj['help'] = 'Returns a struct with infos about the page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getPageInfoVersion';
$this->obj['callback'] = 'this:pageInfo';
$this->obj['args'] = array('string','string');
$this->obj['help'] = 'Returns a struct with infos about the page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getPageVersions';
$this->obj['callback'] = 'this:pageVersions';
$this->obj['args'] = array('string','string','string');
$this->obj['help'] = 'Returns the available revisions of the page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.putPage';
$this->obj['callback'] = 'this:putPage';
$this->obj['args'] = array('string', 'string', 'struct');
$this->obj['help'] = 'Saves a wiki page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.search';
$this->obj['callback'] = 'this:search';
$this->obj['args'] = array('string');
$this->obj['help'] = 'Serches for a string in wiki pages.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.listLinks';
$this->obj['callback'] = 'this:listLinks';
$this->obj['args'] = array('struct','string');
$this->obj['help'] = 'Lists all links contained in a wiki page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getRecentChanges';
$this->obj['callback'] = 'this:getRecentChanges';
$this->obj['args'] = array('string');
$this->obj['help'] = 'Returns a struct about all recent changes since given timestamp.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getRecentMediaChanges';
$this->obj['callback'] = 'this:getRecentMediaChanges';
$this->obj['args'] = array('struct');
$this->obj['help'] = 'Returns a struct about all recent media changes since given timestamp.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.aclCheck';
$this->obj['callback'] = 'this:aclCheck';
$this->obj['args'] = array('int', 'string');
$this->obj['help'] = 'Returns the permissions of a given wiki page.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.putAttachment';
$this->obj['callback'] = 'this:putAttachment';
$this->obj['args'] = array('string', 'base64', 'struct');
$this->obj['help'] = 'Upload a file to the wiki.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.deleteAttachment';
$this->obj['callback'] = 'this:deleteAttachment';
$this->obj['args'] = array('int', 'string');
$this->obj['help'] = 'Delete a file from the wiki.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getAttachment';
$this->obj['callback'] = 'this:getAttachment';
$this->obj['args'] = array('base64', 'string');
$this->obj['help'] = 'Download a file from the wiki.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getAttachmentInfo';
$this->obj['callback'] = 'this:getAttachmentInfo';
$this->obj['args'] = array('struct', 'string');
$this->obj['help'] = 'Returns a struct with infos about the attachment.';
$this->methods[] = $this->obj;
$this->obj['method'] = 'wiki.getPageHTMLPart';
$this->obj['callback'] = 'this:htmlPagePart';
$this->obj['args'] = array('string','string','string','int','int');
$this->obj['help'] = 'Return parts of a page in rendered HTML, latest version.';
$this->methods[] = $this->obj;
}
private function defineSystemMethods()
{
$this->obj['method'] = 'system.methodSignature';
$this->obj['callback'] = 'this:methodSignature';
$this->obj['args'] = array('array', 'string');
$this->obj['help'] = 'Returns an array describing the return type and required parameters of a method';
$this->methods[] = $this->obj;
$this->obj['method'] = 'system.getCapabilities';
$this->obj['callback'] = 'this:getCapabilities';
$this->obj['args'] = array('struct');
$this->obj['help'] = 'Returns a struct describing the XML-RPC specifications supported by this server';
$this->methods[] = $this->obj;
$this->obj['method'] = 'system.listMethods';
$this->obj['callback'] = 'this:listMethods';
$this->obj['args'] = array('array');
$this->obj['help'] = 'Returns an array of available methods on this server';
$this->methods[] = $this->obj;
$this->obj['method'] = 'system.methodHelp';
$this->obj['callback'] = 'this:methodHelp';
$this->obj['args'] = array('string', 'string');
$this->obj['help'] = 'Returns a documentation string for the specified method';
$this->methods[] = $this->obj;
}
public function getWikiMethods()
{
$this->defineWikiMethods();
return $this->methods;
}
public function getSystemMethods()
{
$this->defineSystemMethods();
return $this->methods;
}
}
?>