コード例 #1
0
 /**
  *
  * @param \MwbExporter\Core\Model\ForeignKey $foreignKey
  */
 public function injectRelation( \MwbExporter\Core\Model\ForeignKey $foreignKey)
 {
     foreach($this->relations as $_relation){
         if($_relation->getId() === $foreignKey->getId()){
             return;
         }
     }
     $this->relations[] = $foreignKey;
 }
コード例 #2
0
 public function markAsForeignReference( \MwbExporter\Core\Model\ForeignKey $foreign)
 {
     if($this->foreigns == null) {
         $this->foreigns = array();
     }
     $this->foreigns[($foreign->getId())] = $foreign;
     // $this->foreigns[] = $foreign; // unfortunately this code doubles the references
 }