private function nextSatisfied() { while ($this->it->valid()) { if ($this->predicate->predicate($this->it->current(), $this->it->key())) { break; } else { $this->it->next(); } } }
public function rewind() { $this->i = 0; $this->it->rewind(); while ($this->it->valid()) { if ($this->predicate->predicate($this->it->current(), $this->it->key())) { $this->it->next(); } else { break; } } }
public function valid() { return $this->it->valid() && $this->predicate->predicate($this->it->current(), $this->it->key()); }