Documentation and examples for the SoapClient->__setLocation() method.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@269570 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Herman J. Radtke III 2008-11-23 18:42:29 +00:00
parent 6db6a137c4
commit e4b89704fa

View file

@ -0,0 +1,101 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.soap-soapclient-setlocation" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SoapClient->__setLocation</refname>
<refpurpose>
Sets the location option.
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SoapClient</classname></ooclass>
<methodsynopsis>
<type>string</type>
<methodname>__setLocation</methodname>
<methodparam choice="opt"><type>string</type><parameter>location</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
Sets the endpoint URL that will be touched by following SOAP requests.
</para>
<note>
<para>
Calling this method is optional. The SoapClient uses the endpoint from
the WSDL file by default.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>location</parameter></term>
<listitem>
<para>
The URL to be set. If not specified, the existing value of the location
option will be unset.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The old value of the location option.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Set A Location</title>
<programlisting role="php">
<![CDATA[
<?php
$client = new SoapClient('http://example.com/webservice.php?wsdl');
$client->__setLocation('http://www.somethirdparty.com');
$old_location = $client->__setLocation(); // unsets the location option
echo $old_location;
?>
]]>
</programlisting>
&example.outputs;
<screen role="php">
<![CDATA[
http://www.somethirdparty.com
]]>
</screen>
</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
-->