1 | <?php |
||
13 | class dokuwiki_xmlrpc_server extends IXR_Server { |
||
14 | var $remote; |
||
15 | |||
16 | /** |
||
17 | * Constructor. Register methods and run Server |
||
18 | */ |
||
19 | function __construct(){ |
||
|
|||
20 | $this->remote = new RemoteAPI(); |
||
21 | $this->remote->setDateTransformation(array($this, 'toDate')); |
||
22 | $this->remote->setFileTransformation(array($this, 'toFile')); |
||
23 | parent::__construct(); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @param string $methodname |
||
28 | * @param array $args |
||
29 | * @return IXR_Error|mixed |
||
30 | */ |
||
31 | function call($methodname, $args){ |
||
47 | |||
48 | /** |
||
49 | * @param string|int $data iso date(yyyy[-]mm[-]dd[ hh:mm[:ss]]) or timestamp |
||
50 | * @return IXR_Date |
||
51 | */ |
||
52 | function toDate($data) { |
||
55 | |||
56 | /** |
||
57 | * @param string $data |
||
58 | * @return IXR_Base64 |
||
59 | */ |
||
60 | function toFile($data) { |
||
63 | } |
||
64 | |||
68 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.