protected function firstrun() { $lookup = $this->jointo->ToLookup($this->keyselectjoin, NULL, $this->ismatch); $outerkeyselector = $this->keyselectouter; $resultselector = $this->resultselect; $iter = new \RecursiveIteratorIterator(new SelectManyIterator($this->aiterator, function ($o) use($lookup, $outerkeyselector) { return $lookup[call_user_func_array($outerkeyselector, array($o))]; }, $resultselector)); //append our iterator to the previous empty one //$this->iterator = $iter; parent::__construct($iter); }
public function next() { parent::next(); $this->movetonextmatch(); }
public function current() { $val = parent::current(); $outerkey = call_user_func_array($this->keyselectouter, array($val)); return call_user_func_array($this->resultselect, array($val, $this->lookup[$outerkey])); }