aboutsummaryrefslogtreecommitdiff
path: root/classes/iterators/IsisMainFieldIterator.php
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-07-19 16:44:48 -0300
committerSilvio <silvio@devlet.com.br>2010-07-19 16:44:48 -0300
commitec7c2ae0788a6423909f93d9fb0c51da29585aa6 (patch)
tree7da4d368313133d423c2547bc9a1c0a041510446 /classes/iterators/IsisMainFieldIterator.php
parent5f0e3d2f891e433f2f0aec1222df6c71eb7cdb62 (diff)
downloadcinisis-ec7c2ae0788a6423909f93d9fb0c51da29585aa6.tar.gz
cinisis-ec7c2ae0788a6423909f93d9fb0c51da29585aa6.tar.bz2
More changes to support join_subfields config option
Diffstat (limited to 'classes/iterators/IsisMainFieldIterator.php')
-rw-r--r--classes/iterators/IsisMainFieldIterator.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/iterators/IsisMainFieldIterator.php b/classes/iterators/IsisMainFieldIterator.php
index 68430b8..5ec1cbc 100644
--- a/classes/iterators/IsisMainFieldIterator.php
+++ b/classes/iterators/IsisMainFieldIterator.php
@@ -9,6 +9,8 @@
*/
class IsisMainFieldIterator implements Iterator
{
+ private $class;
+ private $field;
private $valueset;
private $row = 0;
private $rows = 0;
@@ -25,6 +27,8 @@ class IsisMainFieldIterator implements Iterator
public function __construct($class, $field) {
$this->rows = $class->getRows($field);
$this->valueset = $class->getValues($field);
+ $this->class = $class;
+ $this->field = $field;
}
/**
@@ -46,7 +50,8 @@ class IsisMainFieldIterator implements Iterator
* Return the current element.
*/
function current() {
- return $this->valueset[$this->row]['field'];
+ $field = $this->class->getMainFieldName($this->field);
+ return $this->valueset[$this->row][$field];
}
/**