cvs: pear /SOAP Base.php Client.php Parser.php Server.php Value.php WSDL.php /SOAP/Transport SMTP.php /SOAP/example example_types.php
| From: | Jan Schneider | Date: | Fri, 26 Jan 2007 00:18:17 +0000 |
| Subject: | cvs: pear /SOAP Base.php Client.php Parser.php Server.php Value.php WSDL.php /SOAP/Transport SMTP.php /SOAP/example example_types.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44392@lists.php.net to get a copy of this message | ||
yunosh Fri Jan 26 00:18:17 2007 UTC
Modified files:
/pear/SOAP Base.php Client.php Parser.php Server.php Value.php
WSDL.php
/pear/SOAP/Transport SMTP.php
/pear/SOAP/example example_types.php
Log:
Remove many unnecessary references.
http://cvs.php.net/viewvc.cgi/pear/SOAP/Base.php?r1=1.79&r2=1.80&diff_format=u Index: pear/SOAP/Base.php diff -u pear/SOAP/Base.php:1.79 pear/SOAP/Base.php:1.80 --- pear/SOAP/Base.php:1.79 Fri Jan 26 00:01:16 2007 +++ pear/SOAP/Base.php Fri Jan 26 00:18:17 2007 @@ -427,7 +427,7 @@ $array_type = $array_type_prefix = ''; if ($numtypes != 1) { - $arrayTypeQName =& new QName($arrayType); + $arrayTypeQName = new QName($arrayType); $arrayType = $arrayTypeQName->name; $array_types = array(); $array_val = null; @@ -532,8 +532,8 @@ $xml_attr = ''; if (count($attributes)) { foreach ($attributes as $k => $v) { - $kqn =& new QName($k); - $vqn =& new QName($v); + $kqn = new QName($k); + $vqn = new QName($v); $xml_attr .= ' ' . $kqn->fqn() . '="' . $vqn->fqn() . '"'; } } @@ -1049,7 +1049,7 @@ */ function setTypeTranslation($type, $class = null) { - $tq =& new QName($type); + $tq = new QName($type); if (!$class) { $class = $tq->name; } http://cvs.php.net/viewvc.cgi/pear/SOAP/Client.php?r1=1.86&r2=1.87&diff_format=u Index: pear/SOAP/Client.php diff -u pear/SOAP/Client.php:1.86 pear/SOAP/Client.php:1.87 --- pear/SOAP/Client.php:1.86 Mon Jan 22 11:50:13 2007 +++ pear/SOAP/Client.php Fri Jan 26 00:18:17 2007 @@ -273,11 +273,11 @@ $this->headersOut[] =& $soap_value; } elseif (is_array($soap_value)) { // name, value, namespace, mustunderstand, actor - $this->headersOut[] =& new SOAP_Header($soap_value[0], - null, - $soap_value[1], - $soap_value[2], - $soap_value[3]);; + $this->headersOut[] = new SOAP_Header($soap_value[0], + null, + $soap_value[1], + $soap_value[2], + $soap_value[3]); } else { $this->_raiseSoapFault('Invalid parameter provided to addHeader(). Must be an array or a SOAP_Header.'); } @@ -615,7 +615,7 @@ !is_a($nparams[$name], 'SOAP_Value')) { // Type is likely a qname, split it apart, and get // the type namespace from WSDL. - $qname =& new QName($part['type']); + $qname = new QName($part['type']); if ($qname->ns) { $type_namespace = $this->_wsdl->namespaces[$qname->ns]; } elseif (isset($part['namespace'])) { @@ -629,7 +629,7 @@ if ($xmlns) { $pqname = '{' . $xmlns . '}' . $name; } - $nparams[$name] =& new SOAP_Value($pqname, + $nparams[$name] = new SOAP_Value($pqname, $qname->fqn(), $nparams[$name], $attrs); @@ -653,26 +653,26 @@ $this->_options['style'] == 'rpc') { $this->_options['style'] = 'rpc'; $this->docparams = true; - $mqname =& new QName($method, $namespace); - $methodValue =& new SOAP_Value($mqname->fqn(), 'Struct', $params); + $mqname = new QName($method, $namespace); + $methodValue = new SOAP_Value($mqname->fqn(), 'Struct', $params); $soap_msg = $this->makeEnvelope($methodValue, $this->headersOut, $this->_encoding, $this->_options); } else { if (!$params) { - $mqname =& new QName($method, $namespace); + $mqname = new QName($method, $namespace); $mynull = null; - $params =& new SOAP_Value($mqname->fqn(), 'Struct', $mynull); + $params = new SOAP_Value($mqname->fqn(), 'Struct', $mynull); } elseif ($this->_options['input'] == 'parse') { if (is_array($params)) { $nparams = array(); $keys = array_keys($params); foreach ($keys as $k) { if (gettype($params[$k]) != 'object') { - $nparams[] =& new SOAP_Value($k, - false, - $params[$k]); + $nparams[] = new SOAP_Value($k, + false, + $params[$k]); } else { $nparams[] =& $params[$k]; } @@ -680,10 +680,10 @@ $params =& $nparams; } if ($this->_options['parameters']) { - $mqname =& new QName($method, $namespace); - $params =& new SOAP_Value($mqname->fqn(), - 'Struct', - $params); + $mqname = new QName($method, $namespace); + $params = new SOAP_Value($mqname->fqn(), + 'Struct', + $params); } } $soap_msg = $this->makeEnvelope($params, http://cvs.php.net/viewvc.cgi/pear/SOAP/Parser.php?r1=1.40&r2=1.41&diff_format=u Index: pear/SOAP/Parser.php diff -u pear/SOAP/Parser.php:1.40 pear/SOAP/Parser.php:1.41 --- pear/SOAP/Parser.php:1.40 Mon Jan 22 11:33:27 2007 +++ pear/SOAP/Parser.php Fri Jan 26 00:18:17 2007 @@ -209,16 +209,16 @@ // Add current node's value. if ($response) { - $nqn =& new Qname($this->message[$pos]['name'], $this->message[$pos]['namespace']); - $tqn =& new Qname($this->message[$pos]['type'], $this->message[$pos]['type_namespace']); - $response =& new SOAP_Value($nqn->fqn(), $tqn->fqn(), $response, $attrs); + $nqn = new QName($this->message[$pos]['name'], $this->message[$pos]['namespace']); + $tqn = new QName($this->message[$pos]['type'], $this->message[$pos]['type_namespace']); + $response = new SOAP_Value($nqn->fqn(), $tqn->fqn(), $response, $attrs); if (isset($this->message[$pos]['arrayType'])) { $response->arrayType = $this->message[$pos]['arrayType']; } } else { - $nqn =& new Qname($this->message[$pos]['name'], $this->message[$pos]['namespace']); - $tqn =& new Qname($this->message[$pos]['type'], $this->message[$pos]['type_namespace']); - $response =& new SOAP_Value($nqn->fqn(), $tqn->fqn(), $this->message[$pos]['cdata'], $attrs); + $nqn = new QName($this->message[$pos]['name'], $this->message[$pos]['namespace']); + $tqn = new QName($this->message[$pos]['type'], $this->message[$pos]['type_namespace']); + $response = new SOAP_Value($nqn->fqn(), $tqn->fqn(), $this->message[$pos]['cdata'], $attrs); } // handle header attribute that we need @@ -272,7 +272,7 @@ $this->depth_array[$this->depth] = $pos; // set self as current parent $this->parent = $pos; - $qname =& new QName($name); + $qname = new QName($name); // set status if (strcasecmp('envelope', $qname->name) == 0) { $this->status = 'envelope'; @@ -319,7 +319,7 @@ foreach ($attrs as $key => $value) { // If ns declarations, add to class level array of valid // namespaces. - $kqn =& new QName($key); + $kqn = new QName($key); if ($kqn->ns == 'xmlns') { $prefix = $kqn->name; @@ -340,14 +340,14 @@ // If it's a type declaration, set type. } elseif ($kqn->name == 'type') { - $vqn =& new QName($value); + $vqn = new QName($value); $this->message[$pos]['type'] = $vqn->name; $this->message[$pos]['type_namespace'] = $this->_getNamespaceForPrefix($vqn->ns); // Should do something here with the namespace of // specified type? } elseif ($kqn->name == 'arrayType') { - $vqn =& new QName($value); + $vqn = new QName($value); $this->message[$pos]['type'] = 'Array'; if (isset($vqn->arraySize)) { $this->message[$pos]['arraySize'] = $vqn->arraySize; @@ -412,7 +412,7 @@ // Bring depth down a notch. $this->depth--; - $qname =& new QName($name); + $qname = new QName($name); // Get type if not explicitly declared in an xsi:type attribute. // XXX check on integrating wsdl validation here http://cvs.php.net/viewvc.cgi/pear/SOAP/Server.php?r1=1.72&r2=1.73&diff_format=u Index: pear/SOAP/Server.php diff -u pear/SOAP/Server.php:1.72 pear/SOAP/Server.php:1.73 --- pear/SOAP/Server.php:1.72 Mon Jan 22 11:50:13 2007 +++ pear/SOAP/Server.php Fri Jan 26 00:18:17 2007 @@ -356,8 +356,8 @@ if (is_a($method_response[$i], 'SOAP_Value')) { $return_val[] =& $method_response[$i++]; } else { - $qn =& new QName($key, $namespace); - $return_val[] =& new SOAP_Value($qn->fqn(), $type, $method_response[$i++]); + $qn = new QName($key, $namespace); + $return_val[] = new SOAP_Value($qn->fqn(), $type, $method_response[$i++]); } } } else { @@ -369,7 +369,7 @@ $values = array_values($return_type); $return_type = $values[0]; } - $qn =& new QName($return_name, $namespace); + $qn = new QName($return_name, $namespace); $return_val = array(new SOAP_Value($qn->fqn(), $return_type, $method_response)); } } @@ -504,8 +504,8 @@ $return_val = $this->buildResult($method_response, $this->return_type); } - $qn =& new QName($this->methodname . 'Response', $this->method_namespace); - $methodValue =& new SOAP_Value($qn->fqn(), 'Struct', $return_val); + $qn = new QName($this->methodname . 'Response', $this->method_namespace); + $methodValue = new SOAP_Value($qn->fqn(), 'Struct', $return_val); } else { $methodValue =& $method_response; } http://cvs.php.net/viewvc.cgi/pear/SOAP/Value.php?r1=1.45&r2=1.46&diff_format=u Index: pear/SOAP/Value.php diff -u pear/SOAP/Value.php:1.45 pear/SOAP/Value.php:1.46 --- pear/SOAP/Value.php:1.45 Thu Jan 25 23:29:18 2007 +++ pear/SOAP/Value.php Fri Jan 26 00:18:17 2007 @@ -87,14 +87,14 @@ $attributes = array()) { // Detect type if not passed. - $this->nqn =& new QName($name); + $this->nqn = new QName($name); $this->name = $this->nqn->name; $this->namespace = $this->nqn->namespace; - $this->tqn =& new QName($type); + $this->tqn = new QName($type); $this->type = $this->tqn->name; $this->type_prefix = $this->tqn->ns; $this->type_namespace = $this->tqn->namespace; - $this->value =& $value; + $this->value = $value; $this->attributes = $attributes; } http://cvs.php.net/viewvc.cgi/pear/SOAP/WSDL.php?r1=1.98&r2=1.99&diff_format=u Index: pear/SOAP/WSDL.php diff -u pear/SOAP/WSDL.php:1.98 pear/SOAP/WSDL.php:1.99 --- pear/SOAP/WSDL.php:1.98 Mon Jan 22 11:40:12 2007 +++ pear/SOAP/WSDL.php Fri Jan 26 00:18:17 2007 @@ -533,7 +533,7 @@ $comments .= " // {$_argtype['type']} may require attributes, refer to the WSDL for more info.\n"; } $comments .= " \${$attrname}['xmlns'] = '{$this->namespaces[$_argtype['namespace']]}';\n"; - $comments .= " \${$_argtype['type']} =& new SOAP_Value('{$_argtype['type']}', false, \${$_argtype['type']}, \$$attrname);\n"; + $comments .= " \${$_argtype['type']} = new SOAP_Value('{$_argtype['type']}', false, \${$_argtype['type']}, \$$attrname);\n"; $this->_addArg($args, $argarray, $_argtype['type']); if (isset($el['type']) && isset($this->complexTypes[$tns][$el['type']]['attribute'])) { @@ -544,13 +544,13 @@ } } elseif (isset($el['elements'])) { foreach ($el['elements'] as $ename => $element) { - $comments .= " \$$ename =& new SOAP_Value('{{$this->namespaces[$element['namespace']]}}$ename', '" . + $comments .= " \$$ename = new SOAP_Value('{{$this->namespaces[$element['namespace']]}}$ename', '" . (isset($element['type']) ? $element['type'] : false) . "', \$$ename);\n"; $this->_addArg($args, $argarray, $ename); } } else { - $comments .= " \$$_argname =& new SOAP_Value('{{$this->namespaces[$tns]}}$_argname', '{$el['type']}', \$$_argname);\n"; + $comments .= " \$$_argname = new SOAP_Value('{{$this->namespaces[$tns]}}$_argname', '{$el['type']}', \$$_argname);\n"; $this->_addArg($args, $argarray, $_argname); } @@ -567,7 +567,7 @@ $comments .= " // $_argname may require attributes, refer to wsdl for more info\n"; } $wrapname = '{' . $this->namespaces[$_argtype['namespace']].'}' . $_argtype['type']; - $comments .= " \$$_argname =& new SOAP_Value('$_argname', '$wrapname', \$$_argname);\n"; + $comments .= " \$$_argname = new SOAP_Value('$_argname', '$wrapname', \$$_argname);\n"; } $this->_addArg($args, $argarray, $_argname); @@ -699,7 +699,7 @@ } if ($el['complex'] && $argarray) { $wrapname = '{' . $this->namespaces[$_argtype['namespace']].'}' . $el['name']; - $comments .= " \${$el['name']} =& new SOAP_Value('$wrapname', false, \$v = array($argarray));\n"; + $comments .= " \${$el['name']} = new SOAP_Value('$wrapname', false, \$v = array($argarray));\n"; $argarray = "'{$el['name']}' => \${$el['name']}"; } } else { @@ -1192,7 +1192,7 @@ function startElement($parser, $name, $attrs) { // Get element prefix. - $qname =& new QName($name); + $qname = new QName($name); if ($qname->ns) { $ns = $qname->ns; if ($ns && ((!$this->tns && strcasecmp($qname->name, 'definitions') == 0) || $ns == $this->tns)) { @@ -1240,7 +1240,7 @@ } $this->wsdl->complexTypes[$this->schema][$this->currentComplexType] = $attrs; if (array_key_exists('base', $attrs)) { - $qn =& new QName($attrs['base']); + $qn = new QName($attrs['base']); $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['type'] = $qn->name; $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['namespace'] = $qn->ns; } else { @@ -1254,7 +1254,7 @@ case 'element': if (isset($attrs['type'])) { - $qn =& new QName($attrs['type']); + $qn = new QName($attrs['type']); $attrs['type'] = $qn->name; if ($qn->ns && array_key_exists($qn->ns, $this->wsdl->namespaces)) { $attrs['namespace'] = $qn->ns; @@ -1268,7 +1268,7 @@ } if (isset($attrs['ref'])) { - $qn =& new QName($attrs['ref']); + $qn = new QName($attrs['ref']); $this->currentElement = $qn->name; } else { $this->currentElement = $attrs['name']; @@ -1303,7 +1303,7 @@ case 'restriction': if ($this->schemaStatus == 'complexType') { if (!empty($attrs['base'])) { - $qn =& new QName($attrs['base']); + $qn = new QName($attrs['base']); $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['type'] = $qn->name; // Types that extend from other types aren't @@ -1348,10 +1348,10 @@ $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['attribute'][$attrs['name']] = $attrs; } else { if (isset($attrs['ref'])) { - $q =& new QName($attrs['ref']); + $q = new QName($attrs['ref']); foreach ($attrs as $k => $v) { if ($k != 'ref' && strstr($k, $q->name)) { - $vq =& new QName($v); + $vq = new QName($v); if ($q->name == 'arrayType') { $this->wsdl->complexTypes[$this->schema][$this->currentComplexType][$q->name] = $vq->name. $vq->arrayInfo; $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['type'] = 'Array'; @@ -1376,9 +1376,9 @@ case 'part': $qn = null; if (isset($attrs['type'])) { - $qn =& new QName($attrs['type']); + $qn = new QName($attrs['type']); } elseif (isset($attrs['element'])) { - $qn =& new QName($attrs['element']); + $qn = new QName($attrs['element']); } if ($qn) { $attrs['type'] = $qn->name; @@ -1417,7 +1417,7 @@ $this->wsdl->portTypes[$this->currentPortType][$this->currentOperation][$name] = $attrs; } if (array_key_exists('message', $attrs)) { - $qn =& new QName($attrs['message']); + $qn = new QName($attrs['message']); $this->wsdl->portTypes[$this->currentPortType][$this->currentOperation][$name]['message'] = $qn->name; $this->wsdl->portTypes[$this->currentPortType][$this->currentOperation][$name]['namespace'] = $qn->ns; } @@ -1628,7 +1628,7 @@ $this->currentPort = $attrs['name']; $this->wsdl->services[$this->currentService]['ports'][$this->currentPort] = $attrs; // XXX hack to deal with binding namespaces - $qn =& new QName($attrs['binding']); + $qn = new QName($attrs['binding']); $this->wsdl->services[$this->currentService]['ports'][$this->currentPort]['binding'] = $qn->name; $this->wsdl->services[$this->currentService]['ports'][$this->currentPort]['namespace'] = $qn->ns; break; @@ -1731,7 +1731,7 @@ } $this->status = 'binding'; $this->currentBinding = $attrs['name']; - $qn =& new QName($attrs['type']); + $qn = new QName($attrs['type']); $this->wsdl->bindings[$this->currentBinding]['type'] = $qn->name; $this->wsdl->bindings[$this->currentBinding]['namespace'] = $qn->ns; break; @@ -1750,7 +1750,7 @@ $this->wsdl->definition = $attrs; foreach ($attrs as $key => $value) { if (strstr($key, 'xmlns:') !== false) { - $qn =& new QName($key); + $qn = new QName($key); // XXX need to refactor ns handling. $this->wsdl->namespaces[$qn->name] = $value; $this->wsdl->ns[$value] = $qn->name; http://cvs.php.net/viewvc.cgi/pear/SOAP/Transport/SMTP.php?r1=1.26&r2=1.27&diff_format=u Index: pear/SOAP/Transport/SMTP.php diff -u pear/SOAP/Transport/SMTP.php:1.26 pear/SOAP/Transport/SMTP.php:1.27 --- pear/SOAP/Transport/SMTP.php:1.26 Sat Jan 20 00:10:40 2007 +++ pear/SOAP/Transport/SMTP.php Fri Jan 26 00:18:17 2007 @@ -146,18 +146,18 @@ 'password' => $this->password, 'auth' => $this->auth ); - $mailer =& new Mail_smtp($mailer_params); + $mailer = new Mail_smtp($mailer_params); $result = $mailer->send($this->urlparts['path'], $headers, $out); if (!PEAR::isError($result)) { - $val =& new SOAP_Value('Message-ID', 'string', $headers['Message-ID']); + $val = new SOAP_Value('Message-ID', 'string', $headers['Message-ID']); } else { - $sval[] =& new SOAP_Value('faultcode', 'QName', 'SOAP-ENV:Client'); - $sval[] =& new SOAP_Value('faultstring', 'string', "couldn't send SMTP message to {$this->urlparts['path']}"); - $val =& new SOAP_Value('Fault', 'Struct', $sval); + $sval[] = new SOAP_Value('faultcode', 'QName', 'SOAP-ENV:Client'); + $sval[] = new SOAP_Value('faultstring', 'string', "couldn't send SMTP message to {$this->urlparts['path']}"); + $val = new SOAP_Value('Fault', 'Struct', $sval); } - $mqname =& new QName($method, $namespace); - $methodValue =& new SOAP_Value('Response', 'Struct', array($val)); + $mqname = new QName($method, $namespace); + $methodValue = new SOAP_Value('Response', 'Struct', array($val)); $this->incoming_payload = $this->makeEnvelope($methodValue, $this->headers, http://cvs.php.net/viewvc.cgi/pear/SOAP/example/example_types.php?r1=1.4&r2=1.5&diff_format=u Index: pear/SOAP/example/example_types.php diff -u pear/SOAP/example/example_types.php:1.4 pear/SOAP/example/example_types.php:1.5 --- pear/SOAP/example/example_types.php:1.4 Fri Jan 6 17:16:11 2006 +++ pear/SOAP/example/example_types.php Fri Jan 26 00:18:17 2007 @@ -11,7 +11,8 @@ * it from your soap server class, echoStruct in the server class is an * example of doing this. */ -class SOAPStruct { +class SOAPStruct +{ var $varString; var $varInt; @@ -28,14 +29,14 @@ $mustUnderstand = 0, $actor = 'http://schemas.xmlsoap.org/soap/actor/next') { - $inner[] =& new SOAP_Value('varString', 'string', $this->varString); - $inner[] =& new SOAP_Value('varInt', 'int', $this->varInt); - $inner[] =& new SOAP_Value('varFloat', 'float', $this->varFloat); + $inner[] = new SOAP_Value('varString', 'string', $this->varString); + $inner[] = new SOAP_Value('varInt', 'int', $this->varInt); + $inner[] = new SOAP_Value('varFloat', 'float', $this->varFloat); if ($header) { - $value =& new SOAP_Header($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner,$mustUnderstand,$actor); + $value = new SOAP_Header($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner,$mustUnderstand,$actor); } else { - $value =& new SOAP_Value($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner); + $value = new SOAP_Value($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner); } return $value;
http://cvs.php.net/viewvc.cgi/pear/SOAP/Base.php?r1=1.79&r2=1.80&diff_format=u Index: pear/SOAP/Base.php diff -u pear/SOAP/Base.php:1.79 pear/SOAP/Base.php:1.80 --- pear/SOAP/Base.php:1.79 Fri Jan 26 00:01:16 2007 +++ pear/SOAP/Base.php Fri Jan 26 00:18:17 2007 @@ -427,7 +427,7 @@ $array_type = $array_type_prefix = ''; if ($numtypes != 1) { - $arrayTypeQName =& new QName($arrayType); + $arrayTypeQName = new QName($arrayType); $arrayType = $arrayTypeQName->name; $array_types = array(); $array_val = null; @@ -532,8 +532,8 @@ $xml_attr = ''; if (count($attributes)) { foreach ($attributes as $k => $v) { - $kqn =& new QName($k); - $vqn =& new QName($v); + $kqn = new QName($k); + $vqn = new QName($v); $xml_attr .= ' ' . $kqn->fqn() . '="' . $vqn->fqn() . '"'; } } @@ -1049,7 +1049,7 @@ */ function setTypeTranslation($type, $class = null) { - $tq =& new QName($type); + $tq = new QName($type); if (!$class) { $class = $tq->name; } http://cvs.php.net/viewvc.cgi/pear/SOAP/Client.php?r1=1.86&r2=1.87&diff_format=u Index: pear/SOAP/Client.php diff -u pear/SOAP/Client.php:1.86 pear/SOAP/Client.php:1.87 --- pear/SOAP/Client.php:1.86 Mon Jan 22 11:50:13 2007 +++ pear/SOAP/Client.php Fri Jan 26 00:18:17 2007 @@ -273,11 +273,11 @@ $this->headersOut[] =& $soap_value; } elseif (is_array($soap_value)) { // name, value, namespace, mustunderstand, actor - $this->headersOut[] =& new SOAP_Header($soap_value[0], - null, - $soap_value[1], - $soap_value[2], - $soap_value[3]);; + $this->headersOut[] = new SOAP_Header($soap_value[0], + null, + $soap_value[1], + $soap_value[2], + $soap_value[3]); } else { $this->_raiseSoapFault('Invalid parameter provided to addHeader(). Must be an array or a SOAP_Header.'); } @@ -615,7 +615,7 @@ !is_a($nparams[$name], 'SOAP_Value')) { // Type is likely a qname, split it apart, and get // the type namespace from WSDL. - $qname =& new QName($part['type']); + $qname = new QName($part['type']); if ($qname->ns) { $type_namespace = $this->_wsdl->namespaces[$qname->ns]; } elseif (isset($part['namespace'])) { @@ -629,7 +629,7 @@ if ($xmlns) { $pqname = '{' . $xmlns . '}' . $name; } - $nparams[$name] =& new SOAP_Value($pqname, + $nparams[$name] = new SOAP_Value($pqname, $qname->fqn(), $nparams[$name], $attrs); @@ -653,26 +653,26 @@ $this->_options['style'] == 'rpc') { $this->_options['style'] = 'rpc'; $this->docparams = true; - $mqname =& new QName($method, $namespace); - $methodValue =& new SOAP_Value($mqname->fqn(), 'Struct', $params); + $mqname = new QName($method, $namespace); + $methodValue = new SOAP_Value($mqname->fqn(), 'Struct', $params); $soap_msg = $this->makeEnvelope($methodValue, $this->headersOut, $this->_encoding, $this->_options); } else { if (!$params) { - $mqname =& new QName($method, $namespace); + $mqname = new QName($method, $namespace); $mynull = null; - $params =& new SOAP_Value($mqname->fqn(), 'Struct', $mynull); + $params = new SOAP_Value($mqname->fqn(), 'Struct', $mynull); } elseif ($this->_options['input'] == 'parse') { if (is_array($params)) { $nparams = array(); $keys = array_keys($params); foreach ($keys as $k) { if (gettype($params[$k]) != 'object') { - $nparams[] =& new SOAP_Value($k, - false, - $params[$k]); + $nparams[] = new SOAP_Value($k, + false, + $params[$k]); } else { $nparams[] =& $params[$k]; } @@ -680,10 +680,10 @@ $params =& $nparams; } if ($this->_options['parameters']) { - $mqname =& new QName($method, $namespace); - $params =& new SOAP_Value($mqname->fqn(), - 'Struct', - $params); + $mqname = new QName($method, $namespace); + $params = new SOAP_Value($mqname->fqn(), + 'Struct', + $params); } } $soap_msg = $this->makeEnvelope($params, http://cvs.php.net/viewvc.cgi/pear/SOAP/Parser.php?r1=1.40&r2=1.41&diff_format=u Index: pear/SOAP/Parser.php diff -u pear/SOAP/Parser.php:1.40 pear/SOAP/Parser.php:1.41 --- pear/SOAP/Parser.php:1.40 Mon Jan 22 11:33:27 2007 +++ pear/SOAP/Parser.php Fri Jan 26 00:18:17 2007 @@ -209,16 +209,16 @@ // Add current node's value. if ($response) { - $nqn =& new Qname($this->message[$pos]['name'], $this->message[$pos]['namespace']); - $tqn =& new Qname($this->message[$pos]['type'], $this->message[$pos]['type_namespace']); - $response =& new SOAP_Value($nqn->fqn(), $tqn->fqn(), $response, $attrs); + $nqn = new QName($this->message[$pos]['name'], $this->message[$pos]['namespace']); + $tqn = new QName($this->message[$pos]['type'], $this->message[$pos]['type_namespace']); + $response = new SOAP_Value($nqn->fqn(), $tqn->fqn(), $response, $attrs); if (isset($this->message[$pos]['arrayType'])) { $response->arrayType = $this->message[$pos]['arrayType']; } } else { - $nqn =& new Qname($this->message[$pos]['name'], $this->message[$pos]['namespace']); - $tqn =& new Qname($this->message[$pos]['type'], $this->message[$pos]['type_namespace']); - $response =& new SOAP_Value($nqn->fqn(), $tqn->fqn(), $this->message[$pos]['cdata'], $attrs); + $nqn = new QName($this->message[$pos]['name'], $this->message[$pos]['namespace']); + $tqn = new QName($this->message[$pos]['type'], $this->message[$pos]['type_namespace']); + $response = new SOAP_Value($nqn->fqn(), $tqn->fqn(), $this->message[$pos]['cdata'], $attrs); } // handle header attribute that we need @@ -272,7 +272,7 @@ $this->depth_array[$this->depth] = $pos; // set self as current parent $this->parent = $pos; - $qname =& new QName($name); + $qname = new QName($name); // set status if (strcasecmp('envelope', $qname->name) == 0) { $this->status = 'envelope'; @@ -319,7 +319,7 @@ foreach ($attrs as $key => $value) { // If ns declarations, add to class level array of valid // namespaces. - $kqn =& new QName($key); + $kqn = new QName($key); if ($kqn->ns == 'xmlns') { $prefix = $kqn->name; @@ -340,14 +340,14 @@ // If it's a type declaration, set type. } elseif ($kqn->name == 'type') { - $vqn =& new QName($value); + $vqn = new QName($value); $this->message[$pos]['type'] = $vqn->name; $this->message[$pos]['type_namespace'] = $this->_getNamespaceForPrefix($vqn->ns); // Should do something here with the namespace of // specified type? } elseif ($kqn->name == 'arrayType') { - $vqn =& new QName($value); + $vqn = new QName($value); $this->message[$pos]['type'] = 'Array'; if (isset($vqn->arraySize)) { $this->message[$pos]['arraySize'] = $vqn->arraySize; @@ -412,7 +412,7 @@ // Bring depth down a notch. $this->depth--; - $qname =& new QName($name); + $qname = new QName($name); // Get type if not explicitly declared in an xsi:type attribute. // XXX check on integrating wsdl validation here http://cvs.php.net/viewvc.cgi/pear/SOAP/Server.php?r1=1.72&r2=1.73&diff_format=u Index: pear/SOAP/Server.php diff -u pear/SOAP/Server.php:1.72 pear/SOAP/Server.php:1.73 --- pear/SOAP/Server.php:1.72 Mon Jan 22 11:50:13 2007 +++ pear/SOAP/Server.php Fri Jan 26 00:18:17 2007 @@ -356,8 +356,8 @@ if (is_a($method_response[$i], 'SOAP_Value')) { $return_val[] =& $method_response[$i++]; } else { - $qn =& new QName($key, $namespace); - $return_val[] =& new SOAP_Value($qn->fqn(), $type, $method_response[$i++]); + $qn = new QName($key, $namespace); + $return_val[] = new SOAP_Value($qn->fqn(), $type, $method_response[$i++]); } } } else { @@ -369,7 +369,7 @@ $values = array_values($return_type); $return_type = $values[0]; } - $qn =& new QName($return_name, $namespace); + $qn = new QName($return_name, $namespace); $return_val = array(new SOAP_Value($qn->fqn(), $return_type, $method_response)); } } @@ -504,8 +504,8 @@ $return_val = $this->buildResult($method_response, $this->return_type); } - $qn =& new QName($this->methodname . 'Response', $this->method_namespace); - $methodValue =& new SOAP_Value($qn->fqn(), 'Struct', $return_val); + $qn = new QName($this->methodname . 'Response', $this->method_namespace); + $methodValue = new SOAP_Value($qn->fqn(), 'Struct', $return_val); } else { $methodValue =& $method_response; } http://cvs.php.net/viewvc.cgi/pear/SOAP/Value.php?r1=1.45&r2=1.46&diff_format=u Index: pear/SOAP/Value.php diff -u pear/SOAP/Value.php:1.45 pear/SOAP/Value.php:1.46 --- pear/SOAP/Value.php:1.45 Thu Jan 25 23:29:18 2007 +++ pear/SOAP/Value.php Fri Jan 26 00:18:17 2007 @@ -87,14 +87,14 @@ $attributes = array()) { // Detect type if not passed. - $this->nqn =& new QName($name); + $this->nqn = new QName($name); $this->name = $this->nqn->name; $this->namespace = $this->nqn->namespace; - $this->tqn =& new QName($type); + $this->tqn = new QName($type); $this->type = $this->tqn->name; $this->type_prefix = $this->tqn->ns; $this->type_namespace = $this->tqn->namespace; - $this->value =& $value; + $this->value = $value; $this->attributes = $attributes; } http://cvs.php.net/viewvc.cgi/pear/SOAP/WSDL.php?r1=1.98&r2=1.99&diff_format=u Index: pear/SOAP/WSDL.php diff -u pear/SOAP/WSDL.php:1.98 pear/SOAP/WSDL.php:1.99 --- pear/SOAP/WSDL.php:1.98 Mon Jan 22 11:40:12 2007 +++ pear/SOAP/WSDL.php Fri Jan 26 00:18:17 2007 @@ -533,7 +533,7 @@ $comments .= " // {$_argtype['type']} may require attributes, refer to the WSDL for more info.\n"; } $comments .= " \${$attrname}['xmlns'] = '{$this->namespaces[$_argtype['namespace']]}';\n"; - $comments .= " \${$_argtype['type']} =& new SOAP_Value('{$_argtype['type']}', false, \${$_argtype['type']}, \$$attrname);\n"; + $comments .= " \${$_argtype['type']} = new SOAP_Value('{$_argtype['type']}', false, \${$_argtype['type']}, \$$attrname);\n"; $this->_addArg($args, $argarray, $_argtype['type']); if (isset($el['type']) && isset($this->complexTypes[$tns][$el['type']]['attribute'])) { @@ -544,13 +544,13 @@ } } elseif (isset($el['elements'])) { foreach ($el['elements'] as $ename => $element) { - $comments .= " \$$ename =& new SOAP_Value('{{$this->namespaces[$element['namespace']]}}$ename', '" . + $comments .= " \$$ename = new SOAP_Value('{{$this->namespaces[$element['namespace']]}}$ename', '" . (isset($element['type']) ? $element['type'] : false) . "', \$$ename);\n"; $this->_addArg($args, $argarray, $ename); } } else { - $comments .= " \$$_argname =& new SOAP_Value('{{$this->namespaces[$tns]}}$_argname', '{$el['type']}', \$$_argname);\n"; + $comments .= " \$$_argname = new SOAP_Value('{{$this->namespaces[$tns]}}$_argname', '{$el['type']}', \$$_argname);\n"; $this->_addArg($args, $argarray, $_argname); } @@ -567,7 +567,7 @@ $comments .= " // $_argname may require attributes, refer to wsdl for more info\n"; } $wrapname = '{' . $this->namespaces[$_argtype['namespace']].'}' . $_argtype['type']; - $comments .= " \$$_argname =& new SOAP_Value('$_argname', '$wrapname', \$$_argname);\n"; + $comments .= " \$$_argname = new SOAP_Value('$_argname', '$wrapname', \$$_argname);\n"; } $this->_addArg($args, $argarray, $_argname); @@ -699,7 +699,7 @@ } if ($el['complex'] && $argarray) { $wrapname = '{' . $this->namespaces[$_argtype['namespace']].'}' . $el['name']; - $comments .= " \${$el['name']} =& new SOAP_Value('$wrapname', false, \$v = array($argarray));\n"; + $comments .= " \${$el['name']} = new SOAP_Value('$wrapname', false, \$v = array($argarray));\n"; $argarray = "'{$el['name']}' => \${$el['name']}"; } } else { @@ -1192,7 +1192,7 @@ function startElement($parser, $name, $attrs) { // Get element prefix. - $qname =& new QName($name); + $qname = new QName($name); if ($qname->ns) { $ns = $qname->ns; if ($ns && ((!$this->tns && strcasecmp($qname->name, 'definitions') == 0) || $ns == $this->tns)) { @@ -1240,7 +1240,7 @@ } $this->wsdl->complexTypes[$this->schema][$this->currentComplexType] = $attrs; if (array_key_exists('base', $attrs)) { - $qn =& new QName($attrs['base']); + $qn = new QName($attrs['base']); $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['type'] = $qn->name; $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['namespace'] = $qn->ns; } else { @@ -1254,7 +1254,7 @@ case 'element': if (isset($attrs['type'])) { - $qn =& new QName($attrs['type']); + $qn = new QName($attrs['type']); $attrs['type'] = $qn->name; if ($qn->ns && array_key_exists($qn->ns, $this->wsdl->namespaces)) { $attrs['namespace'] = $qn->ns; @@ -1268,7 +1268,7 @@ } if (isset($attrs['ref'])) { - $qn =& new QName($attrs['ref']); + $qn = new QName($attrs['ref']); $this->currentElement = $qn->name; } else { $this->currentElement = $attrs['name']; @@ -1303,7 +1303,7 @@ case 'restriction': if ($this->schemaStatus == 'complexType') { if (!empty($attrs['base'])) { - $qn =& new QName($attrs['base']); + $qn = new QName($attrs['base']); $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['type'] = $qn->name; // Types that extend from other types aren't @@ -1348,10 +1348,10 @@ $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['attribute'][$attrs['name']] = $attrs; } else { if (isset($attrs['ref'])) { - $q =& new QName($attrs['ref']); + $q = new QName($attrs['ref']); foreach ($attrs as $k => $v) { if ($k != 'ref' && strstr($k, $q->name)) { - $vq =& new QName($v); + $vq = new QName($v); if ($q->name == 'arrayType') { $this->wsdl->complexTypes[$this->schema][$this->currentComplexType][$q->name] = $vq->name. $vq->arrayInfo; $this->wsdl->complexTypes[$this->schema][$this->currentComplexType]['type'] = 'Array'; @@ -1376,9 +1376,9 @@ case 'part': $qn = null; if (isset($attrs['type'])) { - $qn =& new QName($attrs['type']); + $qn = new QName($attrs['type']); } elseif (isset($attrs['element'])) { - $qn =& new QName($attrs['element']); + $qn = new QName($attrs['element']); } if ($qn) { $attrs['type'] = $qn->name; @@ -1417,7 +1417,7 @@ $this->wsdl->portTypes[$this->currentPortType][$this->currentOperation][$name] = $attrs; } if (array_key_exists('message', $attrs)) { - $qn =& new QName($attrs['message']); + $qn = new QName($attrs['message']); $this->wsdl->portTypes[$this->currentPortType][$this->currentOperation][$name]['message'] = $qn->name; $this->wsdl->portTypes[$this->currentPortType][$this->currentOperation][$name]['namespace'] = $qn->ns; } @@ -1628,7 +1628,7 @@ $this->currentPort = $attrs['name']; $this->wsdl->services[$this->currentService]['ports'][$this->currentPort] = $attrs; // XXX hack to deal with binding namespaces - $qn =& new QName($attrs['binding']); + $qn = new QName($attrs['binding']); $this->wsdl->services[$this->currentService]['ports'][$this->currentPort]['binding'] = $qn->name; $this->wsdl->services[$this->currentService]['ports'][$this->currentPort]['namespace'] = $qn->ns; break; @@ -1731,7 +1731,7 @@ } $this->status = 'binding'; $this->currentBinding = $attrs['name']; - $qn =& new QName($attrs['type']); + $qn = new QName($attrs['type']); $this->wsdl->bindings[$this->currentBinding]['type'] = $qn->name; $this->wsdl->bindings[$this->currentBinding]['namespace'] = $qn->ns; break; @@ -1750,7 +1750,7 @@ $this->wsdl->definition = $attrs; foreach ($attrs as $key => $value) { if (strstr($key, 'xmlns:') !== false) { - $qn =& new QName($key); + $qn = new QName($key); // XXX need to refactor ns handling. $this->wsdl->namespaces[$qn->name] = $value; $this->wsdl->ns[$value] = $qn->name; http://cvs.php.net/viewvc.cgi/pear/SOAP/Transport/SMTP.php?r1=1.26&r2=1.27&diff_format=u Index: pear/SOAP/Transport/SMTP.php diff -u pear/SOAP/Transport/SMTP.php:1.26 pear/SOAP/Transport/SMTP.php:1.27 --- pear/SOAP/Transport/SMTP.php:1.26 Sat Jan 20 00:10:40 2007 +++ pear/SOAP/Transport/SMTP.php Fri Jan 26 00:18:17 2007 @@ -146,18 +146,18 @@ 'password' => $this->password, 'auth' => $this->auth ); - $mailer =& new Mail_smtp($mailer_params); + $mailer = new Mail_smtp($mailer_params); $result = $mailer->send($this->urlparts['path'], $headers, $out); if (!PEAR::isError($result)) { - $val =& new SOAP_Value('Message-ID', 'string', $headers['Message-ID']); + $val = new SOAP_Value('Message-ID', 'string', $headers['Message-ID']); } else { - $sval[] =& new SOAP_Value('faultcode', 'QName', 'SOAP-ENV:Client'); - $sval[] =& new SOAP_Value('faultstring', 'string', "couldn't send SMTP message to {$this->urlparts['path']}"); - $val =& new SOAP_Value('Fault', 'Struct', $sval); + $sval[] = new SOAP_Value('faultcode', 'QName', 'SOAP-ENV:Client'); + $sval[] = new SOAP_Value('faultstring', 'string', "couldn't send SMTP message to {$this->urlparts['path']}"); + $val = new SOAP_Value('Fault', 'Struct', $sval); } - $mqname =& new QName($method, $namespace); - $methodValue =& new SOAP_Value('Response', 'Struct', array($val)); + $mqname = new QName($method, $namespace); + $methodValue = new SOAP_Value('Response', 'Struct', array($val)); $this->incoming_payload = $this->makeEnvelope($methodValue, $this->headers, http://cvs.php.net/viewvc.cgi/pear/SOAP/example/example_types.php?r1=1.4&r2=1.5&diff_format=u Index: pear/SOAP/example/example_types.php diff -u pear/SOAP/example/example_types.php:1.4 pear/SOAP/example/example_types.php:1.5 --- pear/SOAP/example/example_types.php:1.4 Fri Jan 6 17:16:11 2006 +++ pear/SOAP/example/example_types.php Fri Jan 26 00:18:17 2007 @@ -11,7 +11,8 @@ * it from your soap server class, echoStruct in the server class is an * example of doing this. */ -class SOAPStruct { +class SOAPStruct +{ var $varString; var $varInt; @@ -28,14 +29,14 @@ $mustUnderstand = 0, $actor = 'http://schemas.xmlsoap.org/soap/actor/next') { - $inner[] =& new SOAP_Value('varString', 'string', $this->varString); - $inner[] =& new SOAP_Value('varInt', 'int', $this->varInt); - $inner[] =& new SOAP_Value('varFloat', 'float', $this->varFloat); + $inner[] = new SOAP_Value('varString', 'string', $this->varString); + $inner[] = new SOAP_Value('varInt', 'int', $this->varInt); + $inner[] = new SOAP_Value('varFloat', 'float', $this->varFloat); if ($header) { - $value =& new SOAP_Header($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner,$mustUnderstand,$actor); + $value = new SOAP_Header($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner,$mustUnderstand,$actor); } else { - $value =& new SOAP_Value($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner); + $value = new SOAP_Value($name,'{http://soapinterop.org/xsd}SOAPStruct',$inner); } return $value;