Generic method hashCode() added. Please overwrite it, if you need better hashes.
[core.git] / inc / classes / main / class_BaseFrameworkSystem.php
index 8976961e03920bac0183f0a8f4243311655a1ecf..5f961a1c925828af16e3447953362e3a00141f66 100644 (file)
@@ -1115,6 +1115,17 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        $this->partialStub('Developer mode inactive. Message:' . $message);
                }
        }
+
+       /**
+        * Generates a generic hash code of this class. You should really overwrite
+        * this method with your own hash code generator code. But keep KISS in mind.
+        *
+        * @return      $hashCode       A generic hash code respresenting this whole class
+        */
+       public function hashCode () {
+               // Simple hash code
+               return crc32($this->__toString());
+       }
 }
 
 // [EOF]