mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@152537 c90b9560-bf6c-de11-be94-00142212c4b1
76 lines
2.6 KiB
XML
76 lines
2.6 KiB
XML
<?xml version='1.0' encoding='iso-8859-1'?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<refentry id="function.SoapVar-SoapVar">
|
|
<refnamediv>
|
|
<refname>SoapVar::SoapVar</refname>
|
|
<refpurpose>
|
|
SoapVar constructor
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>object</type><methodname>SoapVar::SoapVar</methodname>
|
|
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>encoding</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>type_name</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>type_namespace</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>node_name</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>node_namespace</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
SoapVar is a special low-level class for encoding parameters and return
|
|
values in nonWSDL mode. It is just a data holder and it has not any
|
|
special method except constructor. It is useful when you like to set type
|
|
property in SOAP request or response. The constructor takes <parameter>data</parameter>
|
|
to pass or return, <parameter>encoding</parameter> ID to encode it
|
|
(see <literal>XSD_...</literal> constants) and as option type name and
|
|
namespace and XML node name and namespace.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Some examples</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
class SOAPStruct {
|
|
function SOAPStruct($s, $i, $f)
|
|
{
|
|
$this->varString = $s;
|
|
$this->varInt = $i;
|
|
$this->varFloat = $f;
|
|
}
|
|
}
|
|
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
|
|
'uri' => "http://test-uri/"));
|
|
$struct = new SOAPStruct('arg', 34, 325.325);
|
|
$soapstruct = new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/xsd");
|
|
$client->echoStruct(new SoapParam($soapstruct, "inputStruct"));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|