From: Roland Häder Date: Sat, 5 Mar 2011 12:26:17 +0000 (+0000) Subject: Now required method equals() added X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=aa4d05fc7f391ba5e6c88732b61c95c0016909eb Now required method equals() added --- diff --git a/inc/config/class_FrameworkConfiguration.php b/inc/config/class_FrameworkConfiguration.php index 6182aa30..7e93e21b 100644 --- a/inc/config/class_FrameworkConfiguration.php +++ b/inc/config/class_FrameworkConfiguration.php @@ -318,7 +318,26 @@ class FrameworkConfiguration implements Registerable { public function hashCode () { return crc32($this->__toString()); } + + /** + * Checks wether an object equals this object. You should overwrite this + * method to implement own equality checks + * + * @param $objectInstance An instance of a FrameworkInterface object + * @return $equals Wether both objects equals + */ + public function equals (FrameworkInterface $objectInstance) { + // Now test it + $equals = (( + $this->__toString() == $objectInstance->__toString() + ) && ( + $this->hashCode() == $objectInstance->hashCode() + )); + + // Return the result + return $result; + } } -// +// [EOF] ?>