<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.zookeeper.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'zookeeper.setwatcher.php',
    1 => 'Zookeeper::setWatcher',
    2 => 'Set a watcher function',
  ),
  'up' => 
  array (
    0 => 'class.zookeeper.php',
    1 => 'Zookeeper',
  ),
  'prev' => 
  array (
    0 => 'zookeeper.setlogstream.php',
    1 => 'Zookeeper::setLogStream',
  ),
  'next' => 
  array (
    0 => 'class.zookeeperconfig.php',
    1 => 'ZookeeperConfig',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/zookeeper/zookeeper/setwatcher.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="zookeeper.setwatcher" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Zookeeper::setWatcher</h1>
  <p class="verinfo">(PECL zookeeper &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">Zookeeper::setWatcher</span> &mdash; <span class="dc-title">Set a watcher function</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-zookeeper.setwatcher-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>Zookeeper::setWatcher</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> <code class="parameter">$watcher_cb</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-zookeeper.setwatcher-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
    <dt><code class="parameter">watcher_cb</code></dt>
    <dd>
     <p class="para">
      A watch will be set at the server to notify the client if the node changes.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-zookeeper.setwatcher-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   成功した場合に <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を、失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-zookeeper.setwatcher-errors">
  <h3 class="title">エラー / 例外</h3>
  <p class="para">
   This method emits PHP error/warning when parameters count or types are wrong or fail to set watcher.
  </p>
  <div class="caution"><strong class="caution">警告</strong>
    <p class="para">
      Since version 0.3.0, this method emits <span class="classname"><a href="class.zookeeperexception.php" class="classname">ZookeeperException</a></span> and it&#039;s derivatives.
    </p>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-zookeeper.setwatcher-seealso">
  <h3 class="title">参考</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="zookeeper.exists.php" class="methodname" rel="rdfs-seeAlso">Zookeeper::exists()</a> - Checks the existence of a node in zookeeper synchronously</span></li>
   <li><span class="methodname"><a href="zookeeper.get.php" class="methodname" rel="rdfs-seeAlso">Zookeeper::get()</a> - Gets the data associated with a node synchronously</span></li>
   <li><span class="classname"><a href="class.zookeeperexception.php" class="classname">ZookeeperException</a></span></li>
  </ul>
 </div>


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