*** empty log message ***
authorjollytoad <jollytoad>
Tue, 1 Mar 2005 10:35:58 +0000 (10:35 +0000)
committerjollytoad <jollytoad>
Tue, 1 Mar 2005 10:35:58 +0000 (10:35 +0000)
classes/ArrayRecordSet.php [new file with mode: 0644]

diff --git a/classes/ArrayRecordSet.php b/classes/ArrayRecordSet.php
new file mode 100644 (file)
index 0000000..0dd3288
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * Really simple RecordSet to allow printTable of arrays.
+ *
+ * $Id: ArrayRecordSet.php,v 1.1.2.1 2005/03/01 10:35:58 jollytoad Exp $
+ */
+class ArrayRecordSet {
+
+       var $_array;
+       var $_count;
+       var $EOF = false;
+       var $f;
+       
+       function ArrayRecordSet($data) {
+               $this->_array = $data;
+               $this->_count = count($this->_array);
+               $this->f = reset($this->_array);
+               if ($this->f === false) $this->EOF = true;
+       }
+       
+       function recordCount() {
+               return $this->_count;
+       }
+       
+       function moveNext() {
+               $this->f = next($this->_array);
+               if ($this->f === false) $this->EOF = true;
+       }
+}
+
+?>