/** * * @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; }
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 }