Beispiel #1
0
 /**
  * Checks whether the provided foreign key represents the same definition as this foreign key
  * @return boolean True if the 2 are the same, false otherwise
  */
 public function equals(ForeignKey $foreignKey)
 {
     if ($this->name != $foreignKey->getName()) {
         return false;
     }
     if ($this->fieldName != $foreignKey->getFieldName()) {
         return false;
     }
     if ($this->referenceTableName != $foreignKey->getReferenceTableName()) {
         return false;
     }
     if ($this->referenceFieldName != $foreignKey->getReferenceFieldName()) {
         return false;
     }
     return true;
 }