cvs: spl /examples seekableiterator.inc

From: Date: Mon, 17 Nov 2003 00:55:38 +0000
Subject: cvs: spl /examples seekableiterator.inc
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24563@lists.php.net to get a copy of this message
helly Sun Nov 16 19:55:38 2003 EDT Modified files: /spl/examples seekableiterator.inc Log: Make it an interface with an code example as comment Index: spl/examples/seekableiterator.inc diff -u spl/examples/seekableiterator.inc:1.2 spl/examples/seekableiterator.inc:1.3 --- spl/examples/seekableiterator.inc:1.2 Tue Nov 11 13:33:34 2003 +++ spl/examples/seekableiterator.inc Sun Nov 16 19:55:37 2003 @@ -1,16 +1,16 @@ <?php -class SeekableIterator implements Iterator +interface SeekableIterator implements Iterator { - function seek($index) { - $this->rewind(); + function seek($index); +/* $this->rewind(); $position = 0; while($position < $index && $this->hasMore()) { $this->next(); $position++; } return $position; - } + }*/ } ?> \ No newline at end of file

« previous php.cvs (#24563) next »