getter, setter are all final; several code clean-ups
[shipsimu.git] / application / ship-simu / main / class_Merchant.php
index b45e8eeb5c8b11d790479475dd53a3bae3c70cc6..3f13a6358564d95e7d391dde5d5b9ec4b0db705e 100644 (file)
@@ -39,7 +39,7 @@ class Merchant extends BaseFrameworkSystem {
                // String absichern
                $merchantName = (string) $merchantName;
 
-               // Instanz holen
+               // Get new instance
                $merchantInstance = new Merchant();
 
                // Debug message
@@ -76,7 +76,7 @@ class Merchant extends BaseFrameworkSystem {
        }
 
        // Setter for merchant name
-       public function setMerchantName ($merchantName) {
+       public final function setMerchantName ($merchantName) {
                // Secure string
                $merchantName = (string) $merchantName;
 
@@ -90,7 +90,7 @@ class Merchant extends BaseFrameworkSystem {
        }
 
        // Getter for merchant name
-       public function getMerchantName () {
+       public final function getMerchantName () {
                if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndlername <strong>%s</strong> wird verlangt.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -100,7 +100,7 @@ class Merchant extends BaseFrameworkSystem {
        }
 
        // Setter for harbor instance
-       public function setHarborInstance (Harbor $harborInstance) {
+       public final function setHarborInstance (Harbor $harborInstance) {
                if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndler <strong>%s</strong> l&auml;sst sich am <strong>%s</strong> nieder.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -111,7 +111,7 @@ class Merchant extends BaseFrameworkSystem {
        }
 
        // Getter for harbor instance
-       public function getHarborInstance () {
+       public final function getHarborInstance () {
                if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndler <strong>%s</strong> hat sich am <strong>%s</strong> niedergelassen.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -147,7 +147,7 @@ class Merchant extends BaseFrameworkSystem {
        }
 
        // Get a price from the merchant's list
-       public function getPriceFromList (ItemIsTradeable $itemInstance) {
+       public final function getPriceFromList (ItemIsTradeable $itemInstance) {
                $price = 0;
 
                // Iterate throw whole list