コード例 #1
0
ファイル: Result.php プロジェクト: Joseki/LeanMapper
 /**
  * @param Result $referencingResult
  * @param string $table
  * @param string $viaColumn
  * @param string $strategy
  */
 public function setReferencingResult(self $referencingResult, $table, $viaColumn = null, $strategy = self::STRATEGY_IN)
 {
     $strategy = $this->translateStrategy($strategy);
     if ($viaColumn === null) {
         $viaColumn = $this->mapper->getRelationshipColumn($table, $this->table);
     }
     $this->referencing["{$table}({$viaColumn}){$strategy}#" . self::PRELOADED_KEY] = $referencingResult;
     unset($this->index[$referencingResult->getOriginKey()]);
 }