<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.zookeeperconfig.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'zookeeperconfig.remove.php',
    1 => 'ZookeeperConfig::remove',
    2 => 'Remove servers from the ensemble',
  ),
  'up' => 
  array (
    0 => 'class.zookeeperconfig.php',
    1 => 'ZookeeperConfig',
  ),
  'prev' => 
  array (
    0 => 'zookeeperconfig.get.php',
    1 => 'ZookeeperConfig::get',
  ),
  'next' => 
  array (
    0 => 'zookeeperconfig.set.php',
    1 => 'ZookeeperConfig::set',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/zookeeper/zookeeperconfig/remove.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="zookeeperconfig.remove" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ZookeeperConfig::remove</h1>
  <p class="verinfo">(PECL zookeeper &gt;= 0.6.0, ZooKeeper &gt;= 3.5.0)</p><p class="refpurpose"><span class="refname">ZookeeperConfig::remove</span> &mdash; <span class="dc-title">Remove servers from the ensemble</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-zookeeperconfig.remove-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>ZookeeperConfig::remove</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$id_list</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$version</code><span class="initializer"> = -1</span></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter reference">&$stat</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-zookeeperconfig.remove-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">id_list</code></dt>
    <dd>
     <p class="para">
      Comma separated list of server IDs to be removed from the ensemble. Each has an id of a server to be removed, only for maj. quorums.
     </p>
    </dd>
   
   
    <dt><code class="parameter">version</code></dt>
    <dd>
     <p class="para">
      The expected version of the node. The function will fail if the actual version of the node does not match the expected version. If -1 is used the version check will not take place.
     </p>
    </dd>
   
   
    <dt><code class="parameter">stat</code></dt>
    <dd>
     <p class="para">
      If not NULL, will hold the value of stat for the path on return.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-zookeeperconfig.remove-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Es wird kein Wert zurückgegeben.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-zookeeperconfig.remove-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
   This method emits <span class="classname"><a href="class.zookeeperexception.php" class="classname">ZookeeperException</a></span> and it&#039;s derivatives when parameters count or types are wrong or fail to save value to node.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-zookeeperconfig.remove-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="zookeeperconfig.remove.example.basic">
   <p><strong>Beispiel #1 <span class="methodname"><strong>ZookeeperConfig::remove()</strong></span> example</strong></p>
   <div class="example-contents"><p>
     Remove members.
   </p></div>
   <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">Zookeeper</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$client</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'localhost:2181'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$client</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addAuth</span><span style="color: #007700">(</span><span style="color: #DD0000">'digest'</span><span style="color: #007700">, </span><span style="color: #DD0000">'timandes:timandes'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$zkConfig </span><span style="color: #007700">= </span><span style="color: #0000BB">$client</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getConfig</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$zkConfig</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set</span><span style="color: #007700">(</span><span style="color: #DD0000">"server.1=localhost:2888:3888:participant;0.0.0.0:2181,server.2=localhost:2889:3889:participant;0.0.0.0:2182"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$zkConfig</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">remove</span><span style="color: #007700">(</span><span style="color: #DD0000">"2"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$zkConfig</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">();<br />if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">)<br />  echo </span><span style="color: #0000BB">$r</span><span style="color: #007700">;<br />else<br />  echo </span><span style="color: #DD0000">'ERR'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">server.1=localhost:2888:3888:participant;0.0.0.0:2181
version=0xca01e881a2</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-zookeeperconfig.remove-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="zookeeperconfig.get.php" class="methodname" rel="rdfs-seeAlso">ZookeeperConfig::get()</a> - Gets the last committed configuration of the ZooKeeper cluster as it is known to the server to which the client is connected, synchronously</span></li>
   <li><span class="methodname"><a href="zookeeperconfig.add.php" class="methodname" rel="rdfs-seeAlso">ZookeeperConfig::add()</a> - Add servers to the ensemble</span></li>
   <li><span class="methodname"><a href="zookeeperconfig.set.php" class="methodname" rel="rdfs-seeAlso">ZookeeperConfig::set()</a> - Change ZK cluster ensemble membership and roles of ensemble peers</span></li>
   <li><span class="classname"><a href="class.zookeeperexception.php" class="classname">ZookeeperException</a></span></li>
  </ul>
 </div>


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