getter, setter are all final; several code clean-ups
[shipsimu.git] / application / ship-simu / main / structures / extended / cabines / class_BaseCabin.php
index 2500226300c668d522471f3909d271dff3f6347e..b12cfcde7daa93bb5a1809501ef1921433529072 100644 (file)
@@ -6,7 +6,7 @@ class BaseCabin extends BaseCabinStructure {
                // Call parent constructor
                parent::constructor($class);
 
-               //Debug message
+               // Debug message
                if (((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
                        $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
                                __CLASS__,
@@ -16,39 +16,21 @@ class BaseCabin extends BaseCabinStructure {
 
                // Set description
                $this->setPartDescr("Kabine");
-
-               // Maybe clean up a little
-               if ($class == __CLASS__) {
-                       $this->removeSystemArray();
-               }
        }
 
-       // Konstruktor aufrufen
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
 
-       // Allgemeine Kabine erstellen
-       public static function createBaseCabin () {
-               // Instanz holen
-               $cabinInstance = new BaseCabin(__CLASS__);
-
-               // Debug message
-               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $cabinInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine allgemeine Kabine wird erstellt.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
-
-               // Generate unique ID number
-               $cabinInstance->createUniqueID();
-
-               // Instanz zurueckgeben
-               return $cabinInstance;
-       }
-
        // Is this a cabin?
-       public function isCabin () {
-               return ($this->isClass("BaseCabin"));
+       public final function isCabin () {
+               return ($this->isSameClass("BaseCabin"));
        }
 
        /**