cvs: pear /SOAP Base.php Fault.php package.xml /SOAP/test all.php

From: Date: Thu, 25 Jan 2007 23:14:05 +0000
Subject: cvs: pear /SOAP Base.php Fault.php package.xml /SOAP/test all.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44384@lists.php.net to get a copy of this message
yunosh Thu Jan 25 23:14:05 2007 UTC Modified files: /pear/SOAP Base.php package.xml Fault.php /pear/SOAP/test all.php Log: Always return objects for structs. http://cvs.php.net/viewvc.cgi/pear/SOAP/Base.php?r1=1.73&r2=1.74&diff_format=u Index: pear/SOAP/Base.php diff -u pear/SOAP/Base.php:1.73 pear/SOAP/Base.php:1.74 --- pear/SOAP/Base.php:1.73 Thu Jan 25 23:04:51 2007 +++ pear/SOAP/Base.php Thu Jan 25 23:14:05 2007 @@ -24,16 +24,6 @@ * @link http://pear.php.net/package/SOAP */ -/** - * SOAP_OBJECT_STRUCT makes PEAR::SOAP use objects for SOAP structures rather - * than arrays. This has been done to provide a closer match to php-soap. If - * the old behaviour is needed, set to false. The old behaviour is - * deprecated. - * - * @global bool $GLOBALS['SOAP_OBJECT_STRUCT'] - */ -$GLOBALS['SOAP_OBJECT_STRUCT'] = true; - require_once 'PEAR.php'; require_once 'SOAP/Type/dateTime.php'; require_once 'SOAP/Type/hexBinary.php'; @@ -660,8 +650,6 @@ */ function _getType(&$value) { - global $SOAP_OBJECT_STRUCT; - $type = gettype($value); switch ($type) { case 'object': @@ -799,12 +787,10 @@ function &_decode(&$soapval) { - global $SOAP_OBJECT_STRUCT; - if (!$this->_isSoapValue($soapval)) { return $soapval; } elseif (is_array($soapval->value)) { - if ($SOAP_OBJECT_STRUCT && $soapval->type != 'Array') { + if ($soapval->type != 'Array') { $classname = $this->_defaultObjectClassname; if (isset($this->_type_translation[$soapval->tqn->fqn()])) { // This will force an error in PHP if the class does not @@ -830,7 +816,7 @@ } $counter = 1; - $isstruct = !$SOAP_OBJECT_STRUCT || !is_array($return); + $isstruct = !is_array($return); foreach ($soapval->value as $item) { if (is_object($return)) { if ($this->_wsdl) { http://cvs.php.net/viewvc.cgi/pear/SOAP/package.xml?r1=1.109&r2=1.110&diff_format=u Index: pear/SOAP/package.xml diff -u pear/SOAP/package.xml:1.109 pear/SOAP/package.xml:1.110 --- pear/SOAP/package.xml:1.109 Thu Jan 25 23:04:51 2007 +++ pear/SOAP/package.xml Thu Jan 25 23:14:05 2007 @@ -48,7 +48,7 @@ <api>beta</api> </stability> <license uri="http://www.php.net/license">PHP License</license> - <notes>* Remove SOAP_RAW_CONVERT setting.</notes> + <notes>* Remove SOAP_RAW_CONVERT and SOAP_OBJECT_STRUCT settings.</notes> <contents> <dir baseinstalldir="SOAP" name="/"> <dir name="example"> http://cvs.php.net/viewvc.cgi/pear/SOAP/Fault.php?r1=1.21&r2=1.22&diff_format=u Index: pear/SOAP/Fault.php diff -u pear/SOAP/Fault.php:1.21 pear/SOAP/Fault.php:1.22 --- pear/SOAP/Fault.php:1.21 Sat Jan 20 00:17:40 2007 +++ pear/SOAP/Fault.php Thu Jan 25 23:14:05 2007 @@ -96,20 +96,12 @@ */ function getFault() { - if ($GLOBALS['SOAP_OBJECT_STRUCT']) { - $fault = new stdClass(); - $fault->faultcode = $this->code; - $fault->faultstring = $this->message; - $fault->faultactor = $this->error_message_prefix; - $fault->detail = $this->userinfo; - return $fault; - } - - return array( - 'faultcode' => $this->code, - 'faultstring' => $this->message, - 'faultactor' => $this->error_message_prefix, - 'detail' => $this->userinfo); + $fault = new stdClass(); + $fault->faultcode = $this->code; + $fault->faultstring = $this->message; + $fault->faultactor = $this->error_message_prefix; + $fault->detail = $this->userinfo; + return $fault; } /** http://cvs.php.net/viewvc.cgi/pear/SOAP/test/all.php?r1=1.6&r2=1.7&diff_format=u Index: pear/SOAP/test/all.php diff -u pear/SOAP/test/all.php:1.6 pear/SOAP/test/all.php:1.7 --- pear/SOAP/test/all.php:1.6 Mon Jan 22 10:37:59 2007 +++ pear/SOAP/test/all.php Thu Jan 25 23:14:05 2007 @@ -1,7 +1,6 @@ <?php require_once 'SOAP/Base.php'; -$GLOBALS['SOAP_OBJECT_STRUCT'] = false; require '5.2.simpletypes.php'; require '5.2.1.simpletypes.string.php';

« previous php.pear.cvs (#44384) next »