X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fconfig%2Fclass_FrameworkConfiguration.php;h=c69bd5ef892a33c12572b4b63aae00c7d28b937e;hp=6182aa3005881d5ce07f82be51161e7f3b3ae9b5;hb=83ceb6f4eb20c78b5e83842bf3bb84cd5758a647;hpb=a3fa89c7cbc54491fc74f13db0927d14acf550c8;ds=sidebyside diff --git a/inc/config/class_FrameworkConfiguration.php b/inc/config/class_FrameworkConfiguration.php index 6182aa30..c69bd5ef 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 $equals; + } } -// +// [EOF] ?>