cvs: pear /MDB2/MDB2 Iterator.php

From: Date: Thu, 06 May 2004 15:45:49 +0000
Subject: cvs: pear /MDB2/MDB2 Iterator.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-19257@lists.php.net to get a copy of this message
lsmith Thu May 6 11:45:49 2004 EDT Modified files: /pear/MDB2/MDB2 Iterator.php Log: several fixes to make the code actually work :-) (thx Ralf) http://cvs.php.net/diff.php/pear/MDB2/MDB2/Iterator.php?r1=1.4&r2=1.5&ty=u Index: pear/MDB2/MDB2/Iterator.php diff -u pear/MDB2/MDB2/Iterator.php:1.4 pear/MDB2/MDB2/Iterator.php:1.5 --- pear/MDB2/MDB2/Iterator.php:1.4 Fri Apr 23 13:06:01 2004 +++ pear/MDB2/MDB2/Iterator.php Thu May 6 11:45:49 2004 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: Iterator.php,v 1.4 2004/04/23 17:06:01 lsmith Exp $ +// $Id: Iterator.php,v 1.5 2004/05/06 15:45:49 lsmith Exp $ /** * @package MDB2 @@ -62,7 +62,7 @@ /** * Constructor */ - function __constructor(&$result) + function __construct(&$result) { $this->result =& $result; } @@ -87,7 +87,7 @@ } $this->row = null; $this->buffer = null; - return $this->result->seek($rownum); + $this->result->seek($rownum); } // }}} @@ -163,13 +163,40 @@ /** * Destructor */ - function __destructor() + function __destruct() { $this->free(); } + + // }}} + // {{{ key() + + /** + * nothing, but Iterator wants to implement this. + * + * @return void + * @access public + */ + function key() + { + $this->result->getRowCount(); + } + + // }}} + // {{{ rewind() + + /** + * seek to the first row in a result set + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function rewind() + { + } } -class MDB2_BufferedIterator extends MDB2_Iterator implements BufferedIterator +class MDB2_BufferedIterator extends MDB2_Iterator implements Iterator { // }}} // {{{ seek()

« previous php.pear.cvs (#19257) next »