public function watch($path, $callback)
{
if (!is_callable($callback)) {
return null;
}
if ($this->zookeeper->exists($path)) {
if (!isset($this->callback[$path])) {
$this->callback[$path] = array();
}
if (!in_array($callback, $this->callback[$path])) {
$this->callback[$path][] = $callback;
return $this->zookeeper->getChildren($path, array($this, 'watchCallback'));
}
}
}