aboutsummaryrefslogtreecommitdiff
path: root/classes/IsisValueIterator.php
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-07-06 19:39:43 -0300
committerSilvio <silvio@devlet.com.br>2010-07-06 19:39:43 -0300
commitffa45903b951f08df999bfd74a70a813852f8419 (patch)
tree5d1a7d0dd6a5a31f4ba0ad280eaae2d70f37c41e /classes/IsisValueIterator.php
parente1de29a6695b266bf4ad3c517cb271593173ee2b (diff)
downloadcinisis-ffa45903b951f08df999bfd74a70a813852f8419.tar.gz
cinisis-ffa45903b951f08df999bfd74a70a813852f8419.tar.bz2
Cleanup on IsisValueIterator
Diffstat (limited to 'classes/IsisValueIterator.php')
-rw-r--r--classes/IsisValueIterator.php15
1 files changed, 2 insertions, 13 deletions
diff --git a/classes/IsisValueIterator.php b/classes/IsisValueIterator.php
index 04b3d92..f10125d 100644
--- a/classes/IsisValueIterator.php
+++ b/classes/IsisValueIterator.php
@@ -6,12 +6,9 @@
*/
class IsisValueIterator implements Iterator
{
- private $keys;
private $valueset;
private $row = 0;
private $rows = 0;
- private $value = 0;
- private $values = 0;
/**
* Constructor.
@@ -25,8 +22,6 @@ class IsisValueIterator implements Iterator
public function __construct($class, $field) {
$this->rows = $class->getRows($field);
$this->valueset = $class->getValues($field);
- $this->keys = array_keys($this->valueset);
- $this->values = count($this->keys);
}
/**
@@ -48,20 +43,14 @@ class IsisValueIterator implements Iterator
* Return the current element.
*/
function current() {
- return $this->valueset[$this->keys[$this->value]];
+ return $this->valueset[$this->row];
}
/**
* Move forward to next element.
*/
function next() {
- if ($this->value >= $this->values) {
- $this->value = 0;
- ++$this->row;
- }
- else {
- ++$this->value;
- }
+ ++$this->row;
}
/**