©
Ce document utilise Manuel du site Web PHP chinois Libérer
(PHP 5 >= 5.0.1)
A class representing a variable or object for use with SOAP services.
$data
, string $encoding
[, string $type_name
[, string $type_namespace
[, string $node_name
[, string $node_namespace
]]]] )$data
, string $encoding
[, string $type_name
[, string $type_namespace
[, string $node_name
[, string $node_namespace
]]]] )[#1] seth dot johnson at gmail dot com [2015-02-25 00:09:51]
It is not documented and thus may be subject to change but if you need to inspect the constructed SoapVar it sets everything you pass it on public variables:
<?php
$foo = new \stdClass();
$foosoap = new \SoapVar($foo, SOAP_ENC_OBJECT, 'Foo');
var_dump($foosoap);
echo $foosoap->enc_stype;
echo get_class($foosoap->enc_value);
?>
Will output (tested in PHP 5.3.3 cli):
object(SoapVar)#2 (3) {
["enc_type"]=>
int(301)
["enc_value"]=>
object(stdClass)#1 (0) {
}
["enc_stype"]=>
string(3) "Foo"
}
Foo
stdClass