Re: [PEPr] Comment on XML::XML_RPC_Simple

From: Date: Sat, 10 Apr 2004 18:42:31 +0000
Subject: Re: [PEPr] Comment on XML::XML_RPC_Simple
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-27405@lists.php.net to get a copy of this message
Le sam 10/04/2004 à 17:26, Greg Beaver a écrit : > Guillaume Lecanu wrote: > > >Le jeu 08/04/2004 à 04:51, PEPr a écrit : > > > > > >>Greg Beaver (http://pear.php.net/user/cellog) has commented on the proposal for > >>XML::XML_RPC_Simple. > >> > >> > > > > > > > > > >>Lastly, this should support PHP 5 in __call(), since that is trivial. > >> > I stand corrected. This is not trivial. What you should do is provide > two classes, XML_RPC_Simple_Client and XML_RPC_Simple_Client5 in > separate files. This way, they can be included based on the PHP version > > // php 5 > function __call($method, $args) > { > $pos = strpos($method, '_'); > if ($pos === false) { > throw new Exception('No class specified'); > } > $service = substr_replace($method, '.', $pos, 1); > array_unshift($args, $service); > return call_user_func_array(array(&$this, 'service'), $args); > } Wooo.. it's not very good the PHP4 transactions to PHP5 ... :'( I have make a patch to XML_RPC, so for make a PHP5 compatibility i will be forced to add a new file to include .. Thanks for this solution Greg. May be anybody have another solution ? > > Regards, > Greg

« previous php.pear.dev (#27405) next »