1<?php
2
3namespace dokuwiki\test\Remote\Mock;
4
5use dokuwiki\Extension\RemotePlugin;
6use dokuwiki\Remote\ApiCall;
7
8class TestPlugin1 extends RemotePlugin
9{
10    function getMethods()
11    {
12        $methods = parent::getMethods(); // auto add all methods, then adjust
13
14        $methods['method2ext'] = new ApiCall([$this, 'method2']); // add a method with a different name
15        $methods['publicCall']->setPublic(); // make this one public
16        return $methods;
17    }
18
19    function method1()
20    {
21        return null;
22    }
23
24    function methodString()
25    {
26        return 'success';
27    }
28
29    function method2($str, $int, $bool = false)
30    {
31        return array($str, $int, $bool);
32    }
33
34    function publicCall()
35    {
36        return true;
37    }
38}
39