php-doc-en/reference/soap/functions/soap-soapvar-construct.xml
Mehdi Achour 5528dd40df Switch ref.soap to the new structure
# Changed filenames and ids to follow the other OO references
# This also fix #30464


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@176801 c90b9560-bf6c-de11-be94-00142212c4b1
2005-01-10 00:46:17 +00:00

140 lines
3.7 KiB
XML

<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.soap-soapvar-construct">
<refnamediv>
<refname>SoapVar->__construct()</refname>
<refpurpose>
SoapVar constructor
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapVar</classname></ooclass>
<constructorsynopsis>
<methodname>__construct</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>
</constructorsynopsis>
</classsynopsis>
<para>
Constructs a new <classname>SoapVar</classname> object.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
The data to pass or return.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>encoding</parameter></term>
<listitem>
<para>
The encoding ID, one of the <literal>XSD_...</literal> constants.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>type_name</parameter></term>
<listitem>
<para>
The type name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>type_namespace</parameter></term>
<listitem>
<para>
The type namespace.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>node_name</parameter></term>
<listitem>
<para>
The XML node name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>node_namespace</parameter></term>
<listitem>
<para>
The XML node namespace.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<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>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.soap-soapclient-call" /></member>
<member><xref linkend="function.soap-soapparam-construct" /></member>
</simplelist>
</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
-->