Generic method hashCode() added. Please overwrite it, if you need better hashes.
[core.git] / inc / classes / main / class_BaseFrameworkSystem.php
index 5fb9912fbdee12c7bb9f7d1ac48fadc77b5ca4aa..5f961a1c925828af16e3447953362e3a00141f66 100644 (file)
@@ -590,27 +590,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                return ($this->__toString() == $className);
        }
 
-       /**
-        * Stub method (only real cabins shall override it)
-        *
-        * @return      boolean false = is no cabin, true = is a cabin
-        * @deprecated
-        */
-       public function isCabin () {
-               return false;
-       }
-
-       /**
-        * Stub method for tradeable objects
-        *
-        * @return      boolean false = is not tradeable by the Merchant class,
-        *                                      true  = is a tradeable object
-        * @deprecated
-        */
-       public function isTradeable () {
-               return false;
-       }
-
        /**
         * Formats computer generated price values into human-understandable formats
         * with thousand and decimal seperators.
@@ -1136,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]