cvs: pear /SOAP Base.php Client.php Server.php
| From: | Jan Schneider | Date: | Fri, 26 Jan 2007 00:30:48 +0000 |
| Subject: | cvs: pear /SOAP Base.php Client.php Server.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44393@lists.php.net to get a copy of this message | ||
yunosh Fri Jan 26 00:30:48 2007 UTC
Modified files:
/pear/SOAP Base.php Client.php Server.php
Log:
Remove more unnecessary references.
http://cvs.php.net/viewvc.cgi/pear/SOAP/Base.php?r1=1.80&r2=1.81&diff_format=u Index: pear/SOAP/Base.php diff -u pear/SOAP/Base.php:1.80 pear/SOAP/Base.php:1.81 --- pear/SOAP/Base.php:1.80 Fri Jan 26 00:18:17 2007 +++ pear/SOAP/Base.php Fri Jan 26 00:30:47 2007 @@ -896,17 +896,16 @@ return $xml; } - function _makeMimeMessage(&$xml, $encoding = SOAP_DEFAULT_ENCODING) + function _makeMimeMessage($xml, $encoding = SOAP_DEFAULT_ENCODING) { if (!@include_once 'Mail/mimePart.php') { return $this->_raiseSoapFault('MIME messages are unsupported, the Mail_Mime package is not installed'); } - // Encode any attachments. - // See http://www.w3.org/TR/SOAP-attachments + // Encode any attachments. See http://www.w3.org/TR/SOAP-attachments // Now we have to mime encode the message. $params = array('content_type' => 'multipart/related; type=text/xml'); - $msg =& new Mail_mimePart('', $params); + $msg = new Mail_mimePart('', $params); // Add the xml part. $params['content_type'] = 'text/xml'; @@ -916,8 +915,8 @@ // Add the attachements for ($i = 0, $c = count($this->_attachments); $i < $c; ++$i) { - $attachment =& $this->_attachments[$i]; - $msg->addSubPart($attachment['body'], $attachment); + $msg->addSubPart($this->_attachments[$i]['body'], + $this->_attachments[$i]); } return $msg->encode(); @@ -933,16 +932,15 @@ // Encode any attachments. See // http://search.ietf.org/internet-drafts/draft-nielsen-dime-soap-00.txt // Now we have to DIME encode the message - $dime =& new Net_DIME_Message(); + $dime = new Net_DIME_Message(); $msg = $dime->encodeData($xml, SOAP_ENVELOP, null, NET_DIME_TYPE_URI); // Add the attachments. $c = count($this->_attachments); for ($i = 0; $i < $c; $i++) { - $attachment =& $this->_attachments[$i]; - $msg .= $dime->encodeData($attachment['body'], - $attachment['content_type'], - $attachment['cid'], + $msg .= $dime->encodeData($this->_attachments[$i]['body'], + $this->_attachments[$i]['content_type'], + $this->_attachments[$i]['cid'], NET_DIME_TYPE_MEDIA); } $msg .= $dime->endMessage(); http://cvs.php.net/viewvc.cgi/pear/SOAP/Client.php?r1=1.87&r2=1.88&diff_format=u Index: pear/SOAP/Client.php diff -u pear/SOAP/Client.php:1.87 pear/SOAP/Client.php:1.88 --- pear/SOAP/Client.php:1.87 Fri Jan 26 00:18:17 2007 +++ pear/SOAP/Client.php Fri Jan 26 00:30:47 2007 @@ -217,9 +217,9 @@ if ($wsdl) { $this->_endpointType = 'wsdl'; // instantiate wsdl class - $this->_wsdl =& new SOAP_WSDL($this->_endpoint, - $this->_proxy_params, - $cache); + $this->_wsdl = new SOAP_WSDL($this->_endpoint, + $this->_proxy_params, + $cache); if ($this->_wsdl->fault) { $this->_raiseSoapFault($this->_wsdl->fault); } @@ -266,11 +266,11 @@ * 'mustunderstand', and 'actor' to send * as a header. */ - function addHeader(&$soap_value) + function addHeader($soap_value) { // Add a new header to the message. if (is_a($soap_value, 'SOAP_Header')) { - $this->headersOut[] =& $soap_value; + $this->headersOut[] = $soap_value; } elseif (is_array($soap_value)) { // name, value, namespace, mustunderstand, actor $this->headersOut[] = new SOAP_Header($soap_value[0], @@ -319,9 +319,9 @@ $this->wire = null; $this->xml = null; - $soap_data =& $this->_generate($method, $params, $namespace, $soapAction); + $soap_data = $this->_generate($method, $params, $namespace, $soapAction); if (PEAR::isError($soap_data)) { - $fault =& $this->_raiseSoapFault($soap_data); + $fault = $this->_raiseSoapFault($soap_data); return $fault; } @@ -336,7 +336,7 @@ if (PEAR::isError($this->_soap_transport)) { $fault =& $this->_soap_transport; $this->_soap_transport = null; - $fault =& $this->_raiseSoapFault($fault); + $fault = $this->_raiseSoapFault($fault); return $fault; } } @@ -354,7 +354,7 @@ $this->wire = $this->getWire(); } if ($this->_soap_transport->fault) { - $fault =& $this->_raiseSoapFault($this->xml); + $fault = $this->_raiseSoapFault($this->xml); return $fault; } @@ -527,8 +527,8 @@ $this->_options['trace'] = $trace; } - function &_generate($method, &$params, $namespace = false, - $soapAction = false) + function _generate($method, &$params, $namespace = false, + $soapAction = false) { $this->fault = null; $this->_options['input'] = 'parse'; @@ -563,23 +563,20 @@ $this->_portName = $this->_wsdl->getPortName($method); } if (PEAR::isError($this->_portName)) { - $fault =& $this->_raiseSoapFault($this->_portName); - return $fault; + return $this->_raiseSoapFault($this->_portName); } // Get endpoint. $this->_endpoint = $this->_wsdl->getEndpoint($this->_portName); if (PEAR::isError($this->_endpoint)) { - $fault =& $this->_raiseSoapFault($this->_endpoint); - return $fault; + return $this->_raiseSoapFault($this->_endpoint); } // Get operation data. $opData = $this->_wsdl->getOperationData($this->_portName, $method); if (PEAR::isError($opData)) { - $fault =& $this->_raiseSoapFault($opData); - return $fault; + return $this->_raiseSoapFault($opData); } $namespace = $opData['namespace']; $this->_options['style'] = $opData['style']; @@ -608,8 +605,7 @@ } else { // We now force an associative array for // parameters if using WSDL. - $fault =& $this->_raiseSoapFault("The named parameter $name is not in the call parameters."); - return $fault; + return $this->_raiseSoapFault("The named parameter $name is not in the call parameters."); } if (gettype($nparams[$name]) != 'object' || !is_a($nparams[$name], 'SOAP_Value')) { @@ -694,8 +690,7 @@ unset($this->headersOut); if (PEAR::isError($soap_msg)) { - $fault =& $this->_raiseSoapFault($soap_msg); - return $fault; + return $this->_raiseSoapFault($soap_msg); } // Handle MIME or DIME encoding. @@ -705,23 +700,20 @@ if ((isset($this->_options['attachments']) && $this->_options['attachments'] == 'Mime') || isset($this->_options['Mime'])) { - $soap_msg =& $this->_makeMimeMessage($soap_msg, - $this->_encoding); + $soap_msg = $this->_makeMimeMessage($soap_msg, $this->_encoding); } else { // default is dime - $soap_msg =& $this->_makeDIMEMessage($soap_msg, - $this->_encoding); + $soap_msg = $this->_makeDIMEMessage($soap_msg, $this->_encoding); $this->_options['headers']['Content-Type'] = 'application/dime'; } if (PEAR::isError($soap_msg)) { - $fault =& $this->_raiseSoapFault($soap_msg); - return $fault; + return $this->_raiseSoapFault($soap_msg); } } // Instantiate client. if (is_array($soap_msg)) { - $soap_data =& $soap_msg['body']; + $soap_data = $soap_msg['body']; if (count($soap_msg['headers'])) { if (isset($this->_options['headers'])) { $this->_options['headers'] = array_merge($this->_options['headers'], $soap_msg['headers']); @@ -730,7 +722,7 @@ } } } else { - $soap_data =& $soap_msg; + $soap_data = $soap_msg; } return $soap_data; @@ -753,7 +745,7 @@ * @param string $encoding Character set encoding, defaults to 'UTF-8'. * @param array $attachments List of attachments. */ - function &parseResponse(&$response, $encoding, &$attachments) + function &parseResponse($response, $encoding, &$attachments) { // Parse the response. $response =& new SOAP_Parser($response, $encoding, $attachments); @@ -773,7 +765,7 @@ return $decoded; } - function &_decodeResponse(&$response, $shift = true) + function &_decodeResponse($response, $shift = true) { if (!$response) { $decoded = null; http://cvs.php.net/viewvc.cgi/pear/SOAP/Server.php?r1=1.73&r2=1.74&diff_format=u Index: pear/SOAP/Server.php diff -u pear/SOAP/Server.php:1.73 pear/SOAP/Server.php:1.74 --- pear/SOAP/Server.php:1.73 Fri Jan 26 00:18:17 2007 +++ pear/SOAP/Server.php Fri Jan 26 00:30:47 2007 @@ -131,7 +131,7 @@ return false; } - $this->fault =& new SOAP_Fault($errmsg, 'Server', 'PHP', "Errno: $errno\nFilename: $filename\nLineno: $linenum\n"); + $this->fault = new SOAP_Fault($errmsg, 'Server', 'PHP', "Errno: $errno\nFilename: $filename\nLineno: $linenum\n"); $this->_sendResponse(); exit; @@ -790,7 +790,7 @@ function bindWSDL($wsdl_url) { /* Instantiate WSDL class. */ - $this->_wsdl =& new SOAP_WSDL($wsdl_url); + $this->_wsdl = new SOAP_WSDL($wsdl_url); if ($this->_wsdl->fault) { $this->_raiseSoapFault($this->_wsdl->fault); } @@ -803,7 +803,7 @@ $service_desc = '') { if (!isset($this->_wsdl)) { - $this->_wsdl =& new SOAP_WSDL; + $this->_wsdl = new SOAP_WSDL; } $this->_wsdl->parseObject($wsdl_obj, $targetNamespace, $service_name, $service_desc); @@ -812,4 +812,5 @@ $this->_raiseSoapFault($this->_wsdl->fault); } } + }
http://cvs.php.net/viewvc.cgi/pear/SOAP/Base.php?r1=1.80&r2=1.81&diff_format=u Index: pear/SOAP/Base.php diff -u pear/SOAP/Base.php:1.80 pear/SOAP/Base.php:1.81 --- pear/SOAP/Base.php:1.80 Fri Jan 26 00:18:17 2007 +++ pear/SOAP/Base.php Fri Jan 26 00:30:47 2007 @@ -896,17 +896,16 @@ return $xml; } - function _makeMimeMessage(&$xml, $encoding = SOAP_DEFAULT_ENCODING) + function _makeMimeMessage($xml, $encoding = SOAP_DEFAULT_ENCODING) { if (!@include_once 'Mail/mimePart.php') { return $this->_raiseSoapFault('MIME messages are unsupported, the Mail_Mime package is not installed'); } - // Encode any attachments. - // See http://www.w3.org/TR/SOAP-attachments + // Encode any attachments. See http://www.w3.org/TR/SOAP-attachments // Now we have to mime encode the message. $params = array('content_type' => 'multipart/related; type=text/xml'); - $msg =& new Mail_mimePart('', $params); + $msg = new Mail_mimePart('', $params); // Add the xml part. $params['content_type'] = 'text/xml'; @@ -916,8 +915,8 @@ // Add the attachements for ($i = 0, $c = count($this->_attachments); $i < $c; ++$i) { - $attachment =& $this->_attachments[$i]; - $msg->addSubPart($attachment['body'], $attachment); + $msg->addSubPart($this->_attachments[$i]['body'], + $this->_attachments[$i]); } return $msg->encode(); @@ -933,16 +932,15 @@ // Encode any attachments. See // http://search.ietf.org/internet-drafts/draft-nielsen-dime-soap-00.txt // Now we have to DIME encode the message - $dime =& new Net_DIME_Message(); + $dime = new Net_DIME_Message(); $msg = $dime->encodeData($xml, SOAP_ENVELOP, null, NET_DIME_TYPE_URI); // Add the attachments. $c = count($this->_attachments); for ($i = 0; $i < $c; $i++) { - $attachment =& $this->_attachments[$i]; - $msg .= $dime->encodeData($attachment['body'], - $attachment['content_type'], - $attachment['cid'], + $msg .= $dime->encodeData($this->_attachments[$i]['body'], + $this->_attachments[$i]['content_type'], + $this->_attachments[$i]['cid'], NET_DIME_TYPE_MEDIA); } $msg .= $dime->endMessage(); http://cvs.php.net/viewvc.cgi/pear/SOAP/Client.php?r1=1.87&r2=1.88&diff_format=u Index: pear/SOAP/Client.php diff -u pear/SOAP/Client.php:1.87 pear/SOAP/Client.php:1.88 --- pear/SOAP/Client.php:1.87 Fri Jan 26 00:18:17 2007 +++ pear/SOAP/Client.php Fri Jan 26 00:30:47 2007 @@ -217,9 +217,9 @@ if ($wsdl) { $this->_endpointType = 'wsdl'; // instantiate wsdl class - $this->_wsdl =& new SOAP_WSDL($this->_endpoint, - $this->_proxy_params, - $cache); + $this->_wsdl = new SOAP_WSDL($this->_endpoint, + $this->_proxy_params, + $cache); if ($this->_wsdl->fault) { $this->_raiseSoapFault($this->_wsdl->fault); } @@ -266,11 +266,11 @@ * 'mustunderstand', and 'actor' to send * as a header. */ - function addHeader(&$soap_value) + function addHeader($soap_value) { // Add a new header to the message. if (is_a($soap_value, 'SOAP_Header')) { - $this->headersOut[] =& $soap_value; + $this->headersOut[] = $soap_value; } elseif (is_array($soap_value)) { // name, value, namespace, mustunderstand, actor $this->headersOut[] = new SOAP_Header($soap_value[0], @@ -319,9 +319,9 @@ $this->wire = null; $this->xml = null; - $soap_data =& $this->_generate($method, $params, $namespace, $soapAction); + $soap_data = $this->_generate($method, $params, $namespace, $soapAction); if (PEAR::isError($soap_data)) { - $fault =& $this->_raiseSoapFault($soap_data); + $fault = $this->_raiseSoapFault($soap_data); return $fault; } @@ -336,7 +336,7 @@ if (PEAR::isError($this->_soap_transport)) { $fault =& $this->_soap_transport; $this->_soap_transport = null; - $fault =& $this->_raiseSoapFault($fault); + $fault = $this->_raiseSoapFault($fault); return $fault; } } @@ -354,7 +354,7 @@ $this->wire = $this->getWire(); } if ($this->_soap_transport->fault) { - $fault =& $this->_raiseSoapFault($this->xml); + $fault = $this->_raiseSoapFault($this->xml); return $fault; } @@ -527,8 +527,8 @@ $this->_options['trace'] = $trace; } - function &_generate($method, &$params, $namespace = false, - $soapAction = false) + function _generate($method, &$params, $namespace = false, + $soapAction = false) { $this->fault = null; $this->_options['input'] = 'parse'; @@ -563,23 +563,20 @@ $this->_portName = $this->_wsdl->getPortName($method); } if (PEAR::isError($this->_portName)) { - $fault =& $this->_raiseSoapFault($this->_portName); - return $fault; + return $this->_raiseSoapFault($this->_portName); } // Get endpoint. $this->_endpoint = $this->_wsdl->getEndpoint($this->_portName); if (PEAR::isError($this->_endpoint)) { - $fault =& $this->_raiseSoapFault($this->_endpoint); - return $fault; + return $this->_raiseSoapFault($this->_endpoint); } // Get operation data. $opData = $this->_wsdl->getOperationData($this->_portName, $method); if (PEAR::isError($opData)) { - $fault =& $this->_raiseSoapFault($opData); - return $fault; + return $this->_raiseSoapFault($opData); } $namespace = $opData['namespace']; $this->_options['style'] = $opData['style']; @@ -608,8 +605,7 @@ } else { // We now force an associative array for // parameters if using WSDL. - $fault =& $this->_raiseSoapFault("The named parameter $name is not in the call parameters."); - return $fault; + return $this->_raiseSoapFault("The named parameter $name is not in the call parameters."); } if (gettype($nparams[$name]) != 'object' || !is_a($nparams[$name], 'SOAP_Value')) { @@ -694,8 +690,7 @@ unset($this->headersOut); if (PEAR::isError($soap_msg)) { - $fault =& $this->_raiseSoapFault($soap_msg); - return $fault; + return $this->_raiseSoapFault($soap_msg); } // Handle MIME or DIME encoding. @@ -705,23 +700,20 @@ if ((isset($this->_options['attachments']) && $this->_options['attachments'] == 'Mime') || isset($this->_options['Mime'])) { - $soap_msg =& $this->_makeMimeMessage($soap_msg, - $this->_encoding); + $soap_msg = $this->_makeMimeMessage($soap_msg, $this->_encoding); } else { // default is dime - $soap_msg =& $this->_makeDIMEMessage($soap_msg, - $this->_encoding); + $soap_msg = $this->_makeDIMEMessage($soap_msg, $this->_encoding); $this->_options['headers']['Content-Type'] = 'application/dime'; } if (PEAR::isError($soap_msg)) { - $fault =& $this->_raiseSoapFault($soap_msg); - return $fault; + return $this->_raiseSoapFault($soap_msg); } } // Instantiate client. if (is_array($soap_msg)) { - $soap_data =& $soap_msg['body']; + $soap_data = $soap_msg['body']; if (count($soap_msg['headers'])) { if (isset($this->_options['headers'])) { $this->_options['headers'] = array_merge($this->_options['headers'], $soap_msg['headers']); @@ -730,7 +722,7 @@ } } } else { - $soap_data =& $soap_msg; + $soap_data = $soap_msg; } return $soap_data; @@ -753,7 +745,7 @@ * @param string $encoding Character set encoding, defaults to 'UTF-8'. * @param array $attachments List of attachments. */ - function &parseResponse(&$response, $encoding, &$attachments) + function &parseResponse($response, $encoding, &$attachments) { // Parse the response. $response =& new SOAP_Parser($response, $encoding, $attachments); @@ -773,7 +765,7 @@ return $decoded; } - function &_decodeResponse(&$response, $shift = true) + function &_decodeResponse($response, $shift = true) { if (!$response) { $decoded = null; http://cvs.php.net/viewvc.cgi/pear/SOAP/Server.php?r1=1.73&r2=1.74&diff_format=u Index: pear/SOAP/Server.php diff -u pear/SOAP/Server.php:1.73 pear/SOAP/Server.php:1.74 --- pear/SOAP/Server.php:1.73 Fri Jan 26 00:18:17 2007 +++ pear/SOAP/Server.php Fri Jan 26 00:30:47 2007 @@ -131,7 +131,7 @@ return false; } - $this->fault =& new SOAP_Fault($errmsg, 'Server', 'PHP', "Errno: $errno\nFilename: $filename\nLineno: $linenum\n"); + $this->fault = new SOAP_Fault($errmsg, 'Server', 'PHP', "Errno: $errno\nFilename: $filename\nLineno: $linenum\n"); $this->_sendResponse(); exit; @@ -790,7 +790,7 @@ function bindWSDL($wsdl_url) { /* Instantiate WSDL class. */ - $this->_wsdl =& new SOAP_WSDL($wsdl_url); + $this->_wsdl = new SOAP_WSDL($wsdl_url); if ($this->_wsdl->fault) { $this->_raiseSoapFault($this->_wsdl->fault); } @@ -803,7 +803,7 @@ $service_desc = '') { if (!isset($this->_wsdl)) { - $this->_wsdl =& new SOAP_WSDL; + $this->_wsdl = new SOAP_WSDL; } $this->_wsdl->parseObject($wsdl_obj, $targetNamespace, $service_name, $service_desc); @@ -812,4 +812,5 @@ $this->_raiseSoapFault($this->_wsdl->fault); } } + }