]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/ships/class_BaseShip.php
getter, setter are all final; several code clean-ups
[shipsimu.git] / application / ship-simu / main / ships / class_BaseShip.php
index d7c394b1e7930bdc164dd551c3017f46ae199648..689374045f8117111e9f6ecffa494f00aee6ee45 100644 (file)
@@ -32,13 +32,18 @@ class BaseShip extends BaseSimulator {
 
                // Array-Objekt generieren
                $this->createStructuresArray();
+
                // Instanz entfernen
                $this->removePartInstance();
                $this->removeNumberFormaters();
        }
 
-       // Konstruktor aufrufen
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
@@ -156,7 +161,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Getter-Methode fuer Strukturen-Array
-       public function getStructuresArray () {
+       public final function getStructuresArray () {
                return $this->structures;
        }
 
@@ -167,7 +172,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Setter-Methode fuer Schiffsnamen
-       public function setShipName ($shipName) {
+       public final function setShipName ($shipName) {
                // Cast the string
                $shipName = (string) $shipName;
 
@@ -184,7 +189,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Getter-Methode fuer Schiffsnamen
-       public function getShipName () {
+       public final function getShipName () {
                if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das <strong>%s</strong> ist auf den Namen <strong>%s</strong> getauft worden.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -195,7 +200,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Setter-Methode fuer Tiefgang
-       public function setDraught ($draught) {
+       public final function setDraught ($draught) {
                if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das <strong>%s</strong> mit dem Namen <strong>%s</strong> hat einen Tiefgang von <strong>%sm</strong>.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -207,7 +212,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Getter-Methode fuer Tiefgang
-       public function getDraught() {
+       public final function getDraught() {
                if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der Tiefgang des Schiffes <strong>%s</strong> wurde angefordert.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -217,7 +222,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Setter-Methode fuer Anzahl Anker
-       public function setNumAnchor ($numAnchor) {
+       public final function setNumAnchor ($numAnchor) {
                if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das <strong>%s</strong> mit dem Namen <strong>%s</strong> hat <strong>%s</strong> Anker.<br />\n",
                        __CLASS__,
                        __LINE__,