done = false; } /** @return whether the current element is valid * which can only happen once per iteration. */ function valid() { return !$this->done && parent::valid(); } /** Do not move forward but instead mark as finished. * @return void */ function next() { $this->done = true; } /** Aggregates the inner iterator */ function __call($func, $params) { return call_user_func_array(array($this->getInnerIterator(), $func), $params); } } ?>