Permalink
Browse files

Cleanup

git-svn-id: http://svn.php.net/repository/pear/packages/SOAP_Interop/trunk@228153 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent d917074 commit 5672332129415aa4f94effb665f1e612f056310b Jan Schneider committed Jan 26, 2007
Showing with 95 additions and 77 deletions.
  1. +95 −77 params_values.php
View
@@ -18,77 +18,96 @@
//
// $Id$
//
+
require_once 'SOAP/Value.php';
require_once 'params_classes.php';
-$soap_test_null = NULL;
+$soap_test_null = null;
$string = 'Hello World';
-$string_soapval =& new SOAP_Value('inputString','string',$string);
-$string_null = NULL;
-$string_null_soapval =& new SOAP_Value('inputString','string',$string_null);
+$string_soapval = new SOAP_Value('inputString', 'string', $string);
+$string_null = null;
+$string_null_soapval = new SOAP_Value('inputString', 'string', $string_null);
$string_entities = "this is a test <hello>\n";
-$string_entities_soapval =& new SOAP_Value('inputString','string',$string_entities);
+$string_entities_soapval = new SOAP_Value('inputString', 'string', $string_entities);
$string_utf8 = utf8_encode('ỗÈéóÒ₧⅜ỗỸ');
-$string_utf8_soapval =& new SOAP_Value('inputString','string',$string_utf8);
-$string_array = array('good','bad');
-$v[] =& new SOAP_Value('item','string','good');
-$v[] =& new SOAP_Value('item','string','bad');
-$string_array_soapval =& new SOAP_Value('inputStringArray','Array',$v);
+$string_utf8_soapval = new SOAP_Value('inputString', 'string', $string_utf8);
+$string_array = array('good', 'bad');
+$string_array_soapval = new SOAP_Value(
+ 'inputStringArray',
+ 'Array',
+ array(new SOAP_Value('item', 'string', 'good'),
+ new SOAP_Value('item', 'string', 'bad')));
$string_array_one = array('good');
-$v = array();
-$v[] =& new SOAP_Value('item','string','good');
-$string_array_one_soapval =& new SOAP_Value('inputStringArray','Array',$v);
+$string_array_one_soapval = new SOAP_Value(
+ 'inputStringArray',
+ 'Array',
+ array(new SOAP_Value('item', 'string', 'good')));
-$string_array_null = NULL;
-$string_array_null_soapval =& new SOAP_Value('inputStringArray','Array',NULL);
+$string_array_null = null;
+$string_array_null_soapval = new SOAP_Value('inputStringArray', 'Array', null);
$string_array_null_soapval->arrayType='{http://www.w3.org/2001/XMLSchema}string';
$integer = 12345;
-$integer_soapval =& new SOAP_Value('inputInteger','int',$integer);
-$integer_array = array(1,234324324,2);
-$v = array();
-$v[] =& new SOAP_Value('item','int',1);
-$v[] =& new SOAP_Value('item','int',234324324);
-$v[] =& new SOAP_Value('item','int',2);
-$integer_array_soapval =& new SOAP_Value('inputIntegerArray','Array',$v);
-
-$integer_array_null = NULL;
-$integer_array_null_soapval =& new SOAP_Value('inputIntegerArray','Array',NULL);
+$integer_soapval = new SOAP_Value('inputInteger', 'int', $integer);
+$integer_array = array(1, 234324324, 2);
+$integer_array_soapval = new SOAP_Value(
+ 'inputIntegerArray',
+ 'Array',
+ array(new SOAP_Value('item', 'int', 1),
+ new SOAP_Value('item', 'int', 234324324),
+ new SOAP_Value('item', 'int', 2)));
+
+$integer_array_null = null;
+$integer_array_null_soapval = new SOAP_Value('inputIntegerArray', 'Array', null);
$integer_array_null_soapval->arrayType='{http://www.w3.org/2001/XMLSchema}int';
$float = 123.45;
-$float_soapval =& new SOAP_Value('inputFloat','float',$float);
-$float_array = array(1.0,2343.24324,-2.5);
-$v = array();
-$v[] =& new SOAP_Value('item','float',1.0);
-$v[] =& new SOAP_Value('item','float',2343.24324);
-$v[] =& new SOAP_Value('item','float',-2.5);
-$float_array_soapval =& new SOAP_Value('inputFloatArray','Array',$v);
-
-$float_array_null = NULL;
-$float_array_null_soapval =& new SOAP_Value('inputFloatArray','Array',NULL);
+$float_soapval = new SOAP_Value('inputFloat', 'float', $float);
+$float_array = array(1.0, 2343.24324, -2.5);
+$float_array_soapval = new SOAP_Value(
+ 'inputFloatArray',
+ 'Array',
+ array(new SOAP_Value('item', 'float', 1.0),
+ new SOAP_Value('item', 'float', 2343.24324),
+ new SOAP_Value('item', 'float', -2.5)));
+
+$float_array_null = null;
+$float_array_null_soapval = new SOAP_Value('inputFloatArray', 'Array', null);
$float_array_null_soapval->arrayType='{http://www.w3.org/2001/XMLSchema}float';
-$soapstruct =& new SOAPStruct('arg',34,325.325);
+$soapstruct = new SOAPStruct('arg', 34, 325.325);
$soapstruct_soapval = $soapstruct->__to_soap();
$soapstruct_header_soapval = $soapstruct->__to_soap('{http://soapinterop.org/echoheader/}echoMeStructRequest');
-$soapstruct_array = array(&$soapstruct, &$soapstruct, &$soapstruct);
-$soapstruct_array_soapval =& new SOAP_Value('inputStructArray','Array',
- array(&$soapstruct_soapval,&$soapstruct_soapval,&$soapstruct_soapval));
-
-$soapstructstruct =& new SOAPStructStruct('arg',34,325.325,$soapstruct);
+$soapstruct_array = array($soapstruct, $soapstruct, $soapstruct);
+$soapstruct_array_soapval = new SOAP_Value(
+ 'inputStructArray',
+ 'Array',
+ array($soapstruct_soapval,
+ $soapstruct_soapval,
+ $soapstruct_soapval));
+
+$soapstructstruct = new SOAPStructStruct('arg', 34, 325.325, $soapstruct);
$soapstructstruct_soapval = $soapstructstruct->__to_soap();
-$soapstructstruct_array = array(&$soapstructstruct, &$soapstructstruct, &$soapstructstruct);
-$soapstructstruct_array_soapval =& new SOAP_Value('inputStructArray','Array',
- array(&$soapstructstruct_soapval,&$soapstructstruct_soapval,&$soapstructstruct_soapval));
-
-$soaparraystruct =& new SOAPArrayStruct('arg',34,325.325,array('good','bad','ugly'));
+$soapstructstruct_array = array($soapstructstruct, $soapstructstruct, $soapstructstruct);
+$soapstructstruct_array_soapval = new SOAP_Value(
+ 'inputStructArray',
+ 'Array',
+ array($soapstructstruct_soapval,
+ $soapstructstruct_soapval,
+ $soapstructstruct_soapval));
+
+$soaparraystruct = new SOAPArrayStruct('arg', 34, 325.325,
+ array('good', 'bad', 'ugly'));
$soaparraystruct_soapval = $soaparraystruct->__to_soap();
-$soaparraystruct_array = array(&$soaparraystruct, &$soaparraystruct, &$soaparraystruct);
-$soaparraystruct_array_soapval =& new SOAP_Value('inputStructArray','Array',
- array(&$soaparraystruct_soapval,&$soaparraystruct_soapval,&$soaparraystruct_soapval));
+$soaparraystruct_array = array($soaparraystruct, $soaparraystruct, $soaparraystruct);
+$soaparraystruct_array_soapval = new SOAP_Value(
+ 'inputStructArray',
+ 'Array',
+ array($soaparraystruct_soapval,
+ $soaparraystruct_soapval,
+ $soaparraystruct_soapval));
$simpletypes = array(
'inputString'=>'arg',
@@ -97,32 +116,32 @@
);
$simpletypes_soapval = array();
-$simpletypes_soapval[] =& new SOAP_Value('inputString','string','arg');
-$simpletypes_soapval[] =& new SOAP_Value('inputInteger','int',34);
-$simpletypes_soapval[] =& new SOAP_Value('inputFloat','float',325.325);
+$simpletypes_soapval[] = new SOAP_Value('inputString', 'string', 'arg');
+$simpletypes_soapval[] = new SOAP_Value('inputInteger', 'int', 34);
+$simpletypes_soapval[] = new SOAP_Value('inputFloat', 'float', 325.325);
$base64 = 'TmVicmFza2E=';
-$base64_soapval =& new SOAP_Value('inputBase64','base64Binary',$base64);
+$base64_soapval = new SOAP_Value('inputBase64', 'base64Binary', $base64);
$hexBin = '736F61707834';
-$hexBin_soapval =& new SOAP_Value('inputHexBinary','hexBinary',$hexBin);
+$hexBin_soapval = new SOAP_Value('inputHexBinary', 'hexBinary', $hexBin);
$decimal = 12345.67890;
-$decimal_soapval =new SOAP_Value('inputDecimal','decimal',$decimal);
+$decimal_soapval =new SOAP_Value('inputDecimal', 'decimal', $decimal);
$dateTime = '2001-05-24T17:31:41Z';
-$dateTime_soapval =& new SOAP_Value('inputDate','dateTime',$dateTime);
+$dateTime_soapval = new SOAP_Value('inputDate', 'dateTime', $dateTime);
-$boolean_true = TRUE;
-$boolean_true_soapval =& new SOAP_Value('inputBoolean','boolean',TRUE);
-$boolean_false = FALSE;
-$boolean_false_soapval =& new SOAP_Value('inputBoolean','boolean',FALSE);
+$boolean_true = true;
+$boolean_true_soapval = new SOAP_Value('inputBoolean', 'boolean', true);
+$boolean_false = false;
+$boolean_false_soapval = new SOAP_Value('inputBoolean', 'boolean', false);
$boolean_one = 1;
-$boolean_one_soapval =& new SOAP_Value('inputBoolean','boolean',1);
+$boolean_one_soapval = new SOAP_Value('inputBoolean', 'boolean', 1);
$boolean_zero = 0;
-$boolean_zero_soapval =& new SOAP_Value('inputBoolean','boolean',0);
+$boolean_zero_soapval = new SOAP_Value('inputBoolean', 'boolean', 0);
-# XXX I know this isn't quite right, need to deal with this better
+// XXX I know this isn't quite right, need to deal with this better
function &make_2d($x, $y)
{
$a = array();
@@ -135,21 +154,20 @@ function &make_2d($x, $y)
return $a;
}
-$multidimarray = make_2d(3,3);
-$v = array();
-$v[0][] =& new SOAP_Value('item','string','row0col0');
-$v[0][] =& new SOAP_Value('item','string','row0col1');
-$v[0][] =& new SOAP_Value('item','string','row0col2');
-$v[1][] =& new SOAP_Value('item','string','row1col0');
-$v[1][] =& new SOAP_Value('item','string','row1col1');
-$v[1][] =& new SOAP_Value('item','string','row1col2');
-$multidimarray_soapval =&
- new SOAP_Value('input2DStringArray','Array',$v);
-
-$multidimarray_soapval->options['flatten'] = TRUE;
+$multidimarray = make_2d(3, 3);
+$multidimarray_soapval = new SOAP_Value(
+ 'input2DStringArray',
+ 'Array',
+ array(array(new SOAP_Value('item', 'string', 'row0col0'),
+ new SOAP_Value('item', 'string', 'row0col1'),
+ new SOAP_Value('item', 'string', 'row0col2')),
+ array(new SOAP_Value('item', 'string', 'row1col0'),
+ new SOAP_Value('item', 'string', 'row1col1'),
+ new SOAP_Value('item', 'string', 'row1col2'))));
+$multidimarray_soapval->options['flatten'] = true;
// Round2GroupC values
-$_person =& new Person(32,12345,'Shane',TRUE);
+$_person = new Person(32, 12345, 'Shane', true);
$person = $_person->__to_soap();
-$_employee =& new Employee($_person,12345,1000000.00);
+$_employee = new Employee($_person, 12345, 1000000.00);
$employee = $_employee->__to_soap();

0 comments on commit 5672332

Please sign in to comment.