summaryrefslogtreecommitdiffstats
path: root/library/SSRS/Object/ArrayIterator.php
diff options
context:
space:
mode:
authorarron.woods <arron.woods@deae1e92-32f9-c189-e222-5b9b5081a27a>2011-03-10 23:14:50 +0000
committerarron.woods <arron.woods@deae1e92-32f9-c189-e222-5b9b5081a27a>2011-03-10 23:14:50 +0000
commit634884044dd95345962db9e54764f37f6ba84853 (patch)
treee16f69cd22e0ac4a1759987e2f66566b4f9a08eb /library/SSRS/Object/ArrayIterator.php
downloadphp-ssrs-634884044dd95345962db9e54764f37f6ba84853.zip
php-ssrs-634884044dd95345962db9e54764f37f6ba84853.tar.gz
php-ssrs-634884044dd95345962db9e54764f37f6ba84853.tar.bz2
v0.1 committed
Diffstat (limited to 'library/SSRS/Object/ArrayIterator.php')
-rwxr-xr-xlibrary/SSRS/Object/ArrayIterator.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/library/SSRS/Object/ArrayIterator.php b/library/SSRS/Object/ArrayIterator.php
new file mode 100755
index 0000000..ad53ad5
--- /dev/null
+++ b/library/SSRS/Object/ArrayIterator.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Iterator
+ *
+ * @author andrew
+ */
+class SSRS_Object_ArrayIterator extends SSRS_Object_Abstract implements Iterator {
+
+ public $iteratorKey = 'Array';
+
+ public function next() {
+ return next($this->data[$this->iteratorKey]);
+ }
+
+ public function prev() {
+ return prev($this->data[$this->iteratorKey]);
+ }
+
+ public function key() {
+ return key($this->data[$this->iteratorKey]);
+ }
+
+ public function current() {
+ return current($this->data[$this->iteratorKey]);
+ }
+
+ public function valid() {
+ return isset($this->data[$this->iteratorKey][$this->key()]);
+ }
+
+ public function rewind() {
+ return reset($this->data[$this->iteratorKey]);
+ }
+
+} \ No newline at end of file