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 6182aa3..7e93e21 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]
 ?>