phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] api/db/adodb-iterator.inc.php, 1.1.2.2


From: nomail
Subject: [Phpgroupware-cvs] api/db/adodb-iterator.inc.php, 1.1.2.2
Date: Thu, 20 May 2004 21:06:00 -0000

Update of /api/db
Modified Files:
        Branch: proposal-branch
          adodb-iterator.inc.php

date: 2004/04/16 20:59:49;  author: seek3r;  state: Exp;  lines: +22 -3

Log Message:
bringing savannah cvs back up to date with what we were doing on our private 
cvs server. We will not be doing dev from this cvs tree
=====================================================================

Parse error: parse error, expecting `'{'' in - on line 22
Errors parsing -
=====================================================================
Index: api/db/adodb-iterator.inc.php
diff -u api/db/adodb-iterator.inc.php:1.1.2.1 
api/db/adodb-iterator.inc.php:1.1.2.2
--- api/db/adodb-iterator.inc.php:1.1.2.1       Sat Feb 28 06:34:10 2004
+++ api/db/adodb-iterator.inc.php       Fri Apr 16 20:59:49 2004
@@ -1,7 +1,7 @@
 <?php
 
 /*
-  V4.20 22 Feb 2004  (c) 2000-2004 John Lim (address@hidden). All rights 
reserved.
+  V4.21 20 Mar 2004  (c) 2000-2004 John Lim (address@hidden). All rights 
reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
@@ -14,9 +14,12 @@
                foreach($rs as $k => $v) {
                        echo $k; print_r($v); echo "<br>";
                }
+               
+               
+       Iterator code based on 
http://cvs.php.net/cvs.php/php-src/ext/spl/examples/cachingiterator.inc?login=2
  */
  
-class ADODB_Iterator implements Iterator {
+ class ADODB_Iterator implements Iterator {
 
     private $rs;
 
@@ -28,22 +31,38 @@
        {
         $this->rs->MoveFirst();
     }
-    function hasMore() 
+
+       function valid() 
        {
         return !$this->rs->EOF;
     }
+       
     function key() 
        {
         return $this->rs->_currentRow;
     }
+       
     function current() 
        {
         return $this->rs->fields;
     }
+       
     function next() 
        {
         $this->rs->MoveNext();
     }
+       
+       function __call($func, $params)
+       {
+               return call_user_func_array(array($this->rs, $func), $params);
+       }
+       
+       function __toString()
+       {
+               return 'ADODB Iterator';
+       }
+
+
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]