<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.soapclient.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'soapclient.setlocation.php',
    1 => 'SoapClient::__setLocation',
    2 => 'Configure l\'URL du service Web &agrave; utiliser',
  ),
  'up' => 
  array (
    0 => 'class.soapclient.php',
    1 => 'SoapClient',
  ),
  'prev' => 
  array (
    0 => 'soapclient.setcookie.php',
    1 => 'SoapClient::__setCookie',
  ),
  'next' => 
  array (
    0 => 'soapclient.setsoapheaders.php',
    1 => 'SoapClient::__setSoapHeaders',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/soap/soapclient/setlocation.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="soapclient.setlocation" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SoapClient::__setLocation</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.0.4, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SoapClient::__setLocation</span> &mdash; <span class="dc-title">Configure l&#039;URL du service Web à utiliser</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-soapclient.setlocation-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SoapClient::__setLocation</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$location</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span></div>

  <p class="para rdfs-comment">
   Configure l&#039;URL cible, à laquelle seront envoyées les requêtes SOAP.
   Cela revient à spécifier l&#039;option <code class="literal">location</code> lors de
   la construction du client <span class="classname"><a href="class.soapclient.php" class="classname">SoapClient</a></span>.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Cette méthode est optionnelle. <span class="classname"><a href="class.soapclient.php" class="classname">SoapClient</a></span> utilise 
    l&#039;URL indiquée dans le fichier WSDL par défaut.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-soapclient.setlocation-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">location</code></dt>
     <dd>
      <p class="para">
       La nouvelle URL.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-soapclient.setlocation-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   L&#039;ancienne URL.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-soapclient.setlocation-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.3</td>
      <td>
       <code class="parameter">location</code> est désormais nullable.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-soapclient.setlocation-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>SoapClient::__setLocation()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$client </span><span style="color: #007700">= new </span><span style="color: #0000BB">SoapClient</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.com/webservice.php?wsdl'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$client</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">__setLocation</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://www.somethirdparty.com'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$old_location </span><span style="color: #007700">= </span><span style="color: #0000BB">$client</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">__setLocation</span><span style="color: #007700">(); </span><span style="color: #FF8000">// unsets the location option<br /><br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">$old_location</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Résultat de l&#039;exemple ci-dessus est similaire à :</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">http://www.somethirdparty.com</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-soapclient.setlocation-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="soapclient.construct.php" class="methodname" rel="rdfs-seeAlso">SoapClient::__construct()</a> - Constructeur SoapClient</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>