summaryrefslogtreecommitdiff
path: root/ext/spl/examples/searchiterator.inc
blob: 1ce5a2eebd7de70ab0bd948e9d4f5f5a4a0d044a (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 hasMore() {
		return !$this->done && parent::hasMore();
	}
	
	function next() {
		$this->done = true;
	}
}

?>