Re: XML_RPC's globals

From: Date: Fri, 22 Aug 2003 04:41:41 +0000
Subject: Re: XML_RPC's globals
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20356@lists.php.net to get a copy of this message
Marshall: If you feel up to the task, modify Remote.php to work in a better way, and post the patch. One of the 4 of us with CVS access will be able to review it and commit it when this whole PHP 4.3.3 business is out of the way. As for the move from Remote.php to XML_RPC, that is something that you can also create a patch for, and bug the maintainer of XML_RPC about :). Greg Marshall Roch wrote:
PEAR/Remote.php uses one of XML_RPC's globals (specifically, the one that defines the HTTP error code). This seems like a bad idea: what if, in the future, some sort of processing needs to be done, e.g. reading from a config file, or parsing the value from the RPC response? It would be better to use functions, since anything can be done inside the function, while still returning the desired value, invisible to the other packages. For BC, the GLOBALS can be set using the function. Also, Remote.php has a "slightly extended" version of XML_RPC_encode() that looks like it could benefit all XML-RPC cases, not just whatever Remote.php is doing. I see no reason not to put this directly into XML_RPC and to take it out of Remote.php. What is the best way to proceed? -- Marshall Roch


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