Re: Using XML_RPC with object oriented code
| From: | Sérgio Carvalho | Date: | Tue, 10 Feb 2004 15:37:08 +0000 |
| Subject: | Re: Using XML_RPC with object oriented code | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10605@lists.php.net to get a copy of this message | ||
From the XML_RPC_Server source code, here:
http://cvs.php.net/annotate.php/pear/XML_RPC/Server.php?login=2&rev=1.4
the function dispatching seems to be the code in line 284:
eval('$r=' . $dmap[$methName]['function'] . '($m);');
This code will evaluate class method calls, of the form 'Foo::bar()', so you would pass the function name as 'Foo::bar' on the XML_RPC server dispatch map definition.
reference:
http://pt2.php.net/manual/en/keyword.paamayim-nekudotayim.php
Cheers,
Sérgio
Norman Elton wrote:
Hello, I'm having difficulty using the XML_RPC module in an objected-oriented environment. I've got the XML_RPC_Server() declaration in a function of a class. The declaration expects, as a string, the function name to call. I can't figure out how to specify "$this->function()". It's a shame you can't pass the function by reference. Any ideas? Thanks Norman ------------------------------------------------------ Norman Elton Information Technology - Network Engineering College of William & Mary 757-221-7790