summaryrefslogtreecommitdiff
path: root/ext/spl/examples/searchiterator.inc
blob: a9ba9df17185c537aaaf6ef3d68781ae06409162 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php

abstract class SearchIterator extends FilterIterator
{
	private $done = false;

	function rewind() {
		parent::rewind();
		$this->done = false;
	}

	function valid() {
		return !$this->done && parent::valid();
	}
	
	function next() {
		$this->done = true;
	}
}

?>