]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/drives/class_BaseDrive.php
getter, setter are all final; several code clean-ups
[shipsimu.git] / application / ship-simu / main / drives / class_BaseDrive.php
index bda42a41f6f2cb31bdd7c5b4b67a1db101fdcb8c..ad52dd2390a89c5b0a079e3dedb455f2a082aee5 100644 (file)
@@ -25,18 +25,23 @@ class BaseDrive extends BaseSimulator {
                // Set description
                $this->setPartDescr("Namenloser Antrieb");
 
-               // Etwas aufraeumen
+               // Clean up a little
                $this->removeNumberFormaters();
                $this->removePartInstance();
        }
 
-       // Konstruktor aufrufen
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
 
        // Setter-Methode fuert PS-Zahl
-       public function setHorsePower ($hp) {
+       public final function setHorsePower ($hp) {
                if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Antriebsleistung wird auf <strong>%d</strong> PS gesetzt.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -46,7 +51,7 @@ class BaseDrive extends BaseSimulator {
        }
 
        // Setter-Methode fuer Nockenanzahl
-       public function setNumCams ($cams) {
+       public final function setNumCams ($cams) {
                if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Nockenanzahl wird auf <strong>%d</strong> Nocken gesetzt.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -56,12 +61,12 @@ class BaseDrive extends BaseSimulator {
        }
 
        // Setter for price
-       public function setPrice ($price) {
+       public final function setPrice ($price) {
                $this->price = (float) $price;
        }
 
        // Getter for price
-       public function getPrice () {
+       public final function getPrice () {
                return $this->price;
        }