Translations of this page?:
This event will be replaced by Remote Plugins

XMLRPC_CALLBACK_REGISTER

Description:
Add XMLRPC callbacks
DefaultAction:
None
Preventable:
yes
Added:
2008-08-24

The event is signalled by dokuwiki_xmlrpc_server() in lib/exe/xmlrpc.php. You can use this event to register your own XMLRPC callbacks.

Passed Data

The XMLRPC server object.

Plugins handling this event

The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.

  • FIXME

See also

Usage

In the action.php or action plugin you will need to do a 2 step process.

First register the call back hook to a function that will actually add the xml-rpc call.

    function register(&$controller) {
        $controller->register_hook('XMLRPC_CALLBACK_REGISTER', 'BEFORE',  $this, 'registerCallback');
    }

Second register your function.

    function registerCallback(&$event) {
        $event->data->addCallback(
            'report.getReportData',
            'plugin:reports:getReportData',
            array('struct'),
            'blah.',
            true
        );
    }

The addCallback function is as follows. Note that the format for the second parameter is 'plugin:<plugin name>:<function name>'

function addCallback($method, $callback, $args, $help, $public=false)
devel/event/xmlrpc_callback_register.txt · Last modified: 2012/03/24 18:58 by 92.225.178.40
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate