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->get($path, array($this, 'watchCallback'));
			}
		}
	}
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->get($path, array($this, 'watchCallback'));
			}
		}
	}
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 -> get ( $ path , array ( $ this , 'watchCallback' ) ) ; } } }
Wath a given path
@param string $path the path to node
@param callable $callback callback function
@return string|null
Wath a given path