/** * Return the current junction row. * * Similar to the current() function for arrays in PHP * Required by interface Iterator. * * @return Zend_Db_Table_Row_Abstract current element from the collection */ public function currentJunction() { // the following block ensures that the order returned by the junction look does not matter $curMatch = $this->current(); $value = $curMatch[$this->_referenceMap['refColumns'][0]]; // @todo: compound keys $index = array_search($value, $this->_junctionRowsetIndex); $this->_junctionRowset->seek($index); return $this->_junctionRowset->current(); }