]> git.mxchange.org Git - core.git/commitdiff
Now required method equals() added
authorRoland Häder <roland@mxchange.org>
Sat, 5 Mar 2011 12:26:17 +0000 (12:26 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 5 Mar 2011 12:26:17 +0000 (12:26 +0000)
inc/config/class_FrameworkConfiguration.php

index 6182aa3005881d5ce07f82be51161e7f3b3ae9b5..7e93e21be247d157f9b1ece5671d08ea575b8bcf 100644 (file)
@@ -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]
 ?>