XML_RPC's globals

From: Date: Fri, 22 Aug 2003 04:37:37 +0000
Subject: XML_RPC's globals
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20355@lists.php.net to get a copy of this message
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 (#20355) next »