From aa4d05fc7f391ba5e6c88732b61c95c0016909eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 5 Mar 2011 12:26:17 +0000 Subject: [PATCH] Now required method equals() added --- inc/config/class_FrameworkConfiguration.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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] ?> -- 2.39.5