^ This event is replaced by [[devel:Remote Plugins]] ^
====== XMLRPC_CALLBACK_REGISTER ======
---- dataentry event ----
Description: Add XML-RPC callbacks
DefaultAction: None
Preventable: yes
Added_dt: 2008-08-24
Removed_dt: 2012-03-23
----
The event is signalled by [[xref>dokuwiki_xmlrpc_server()]] in [[xref>lib/exe/xmlrpc.php]]. You can use this event to register your own XML-RPC callbacks. Event removed: use [[plugintype>64#extension__table|Remote Plugins]]
===== Passed Data =====
The XML-RPC server object.
===== See also =====
* [[codesearch>XMLRPC_CALLBACK_REGISTER|Code related to this event]] used in any DokuWiki's files, plugins and templates
* [[devel:Remote Plugins]]
* [[devel:Action Plugins]]
* [[devel:Events]]
* [[devel:XMLRPC|XML-RPC]]
===== 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(Doku_Event_Handler $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::'
function addCallback($method, $callback, $args, $help, $public=false)