SPL-StandardPHPLibrary
searchiterator.inc
Go to the documentation of this file.
1 <?php
2 
20 abstract class SearchIterator extends FilterIterator
21 {
23  private $done = false;
24 
28  function rewind()
29  {
30  parent::rewind();
31  $this->done = false;
32  }
33 
37  function valid()
38  {
39  return !$this->done && parent::valid();
40  }
41 
45  function next()
46  {
47  $this->done = true;
48  }
49 
52  function __call($func, $params)
53  {
54  return call_user_func_array(array($this->getInnerIterator(), $func), $params);
55  }
56 }
57 
58 ?>
next()
Do not move forward but instead mark as finished.
rewind()
Rewind and reset so that it once again searches.
__call($func, $params)
Aggregates the inner iterator.
Abstract filter for iterators.
Iterator to search for a specific element.