コード例 #1
0
ファイル: JoinIterator.php プロジェクト: halfnelson/LINQ4PHP
 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);
 }
コード例 #2
0
 public function next()
 {
     parent::next();
     $this->movetonextmatch();
 }
コード例 #3
0
 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]));
 }