getter, setter are all final; several code clean-ups
authorRoland Häder <roland@mxchange.org>
Sat, 8 Mar 2008 12:51:42 +0000 (12:51 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 8 Mar 2008 12:51:42 +0000 (12:51 +0000)
34 files changed:
application/selector/class_ApplicationSelector.php
application/ship-simu/init.php
application/ship-simu/main/class_BasePersonell.php
application/ship-simu/main/class_BaseSimulator.php
application/ship-simu/main/class_Merchant.php
application/ship-simu/main/class_WorksContract.php
application/ship-simu/main/companies/class_ShippingCompany.php
application/ship-simu/main/constructions/class_BaseConstruction.php
application/ship-simu/main/constructions/harbors/class_Harbor.php
application/ship-simu/main/constructions/yards/class_Shipyard.php
application/ship-simu/main/drives/class_BaseDrive.php
application/ship-simu/main/drives/motor/class_Motor.php
application/ship-simu/main/parts/class_BaseShipPart.php
application/ship-simu/main/parts/maschineroom/class_MaschineRoom.php
application/ship-simu/main/personell/class_SimulatorPersonell.php
application/ship-simu/main/ships/class_BaseShip.php
application/ship-simu/main/ships/passenger/class_PassengerShip.php
application/ship-simu/main/structures/class_BaseStructure.php
application/ship-simu/main/structures/extended/cabines/class_BaseCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_EconomyCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_LowCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_LuxuryCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_PremierCabin.php
application/ship-simu/main/structures/extended/class_BaseCabinStructure.php
application/ship-simu/main/structures/extended/class_BaseDeckStructure.php
application/ship-simu/main/structures/extended/class_BaseUpperStructure.php
application/ship-simu/main/structures/extended/decks/cargo/class_CarDeck.php
application/ship-simu/main/structures/extended/decks/cargo/class_TrainDeck.php
application/ship-simu/main/structures/extended/decks/cargo/class_TruckDeck.php
application/ship-simu/main/structures/extended/decks/class_BaseDeck.php
application/ship-simu/main/structures/extended/upper/class_Bridge.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/database/classes/class_LocalFileDatabase.php
tests/contract-test.php

index bd3a86b78133de509c6d7cbc1d73a56d9045cfb7..cbfc91daa0c7be5a695017006b46f90d654bf34f 100644 (file)
@@ -283,7 +283,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
         * @return      void
         * @see         LanguageSystem
         */
         * @return      void
         * @see         LanguageSystem
         */
-       public function setLanguageInstance (ManageableLanguage $langInstance) {
+       public final function setLanguageInstance (ManageableLanguage $langInstance) {
                $this->langInstance = $langInstance;
        }
 
                $this->langInstance = $langInstance;
        }
 
@@ -293,7 +293,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
         * @param               $fileIOInstance An instance to the file I/O sub-system
         * @return      void
         */
         * @param               $fileIOInstance An instance to the file I/O sub-system
         * @return      void
         */
-       public function setFileIOInstance (FileIOHandler $fileIOInstance) {
+       public final function setFileIOInstance (FileIOHandler $fileIOInstance) {
                $this->fileIOInstance = $fileIOInstance;
        }
 
                $this->fileIOInstance = $fileIOInstance;
        }
 
index 0446060520326064e195defa62e7a8d3121b9d2c..b14230cc4cd59f29b079430efadd297e2783543c 100644 (file)
@@ -7,7 +7,7 @@
 // You can prevent adding this application to the selector by uncommenting the
 // following line:
 //
 // You can prevent adding this application to the selector by uncommenting the
 // following line:
 //
-// if ((isset($this)) && (is_object($this)) && ($this->isClass("ApplicationSelector"))) { return; }
+// if ((isset($this)) && (is_object($this)) && ($this->isSameClass("ApplicationSelector"))) { return; }
 //
 // isset() is required to prevent a warning and is_object() is highly required
 // when the application itself is requested in URL (hint: index.php?app=your_app)
 //
 // isset() is required to prevent a warning and is_object() is highly required
 // when the application itself is requested in URL (hint: index.php?app=your_app)
index 09e3576a99b97590aa8d4278a6c0dcc19d2d394f..d79a0d8da783e232c936fb03854dcbb21bffb03f 100644 (file)
@@ -141,7 +141,7 @@ class BasePersonell extends BaseFrameworkSystem implements Personellizer {
        }
 
        // Getter for surname
        }
 
        // Getter for surname
-       public function getSurname () {
+       public final function getSurname () {
                return $this->surname;
        }
 
                return $this->surname;
        }
 
@@ -203,35 +203,35 @@ class BasePersonell extends BaseFrameworkSystem implements Personellizer {
        }
 
        // Remove gender
        }
 
        // Remove gender
-       public function removeGender () {
+       public final function removeGender () {
                unset($this->gender);
        }
 
        // Remove both names
                unset($this->gender);
        }
 
        // Remove both names
-       public function removeNames () {
+       public final function removeNames () {
                unset($this->surname);
                unset($this->family);
        }
 
        // Remove complete birthday
                unset($this->surname);
                unset($this->family);
        }
 
        // Remove complete birthday
-       public function removeBirthday () {
+       public final function removeBirthday () {
                unset($this->yearBirth);
                unset($this->monthBirth);
                unset($this->dayBirth);
        }
 
        // Remove salary
                unset($this->yearBirth);
                unset($this->monthBirth);
                unset($this->dayBirth);
        }
 
        // Remove salary
-       public function removeSalary () {
+       public final function removeSalary () {
                unset($this->salary);
        }
 
        // Remove employment status
                unset($this->salary);
        }
 
        // Remove employment status
-       public function removeEmployed () {
+       public final function removeEmployed () {
                unset($this->employed);
        }
 
        // Remove marrital status
                unset($this->employed);
        }
 
        // Remove marrital status
-       public function removeMarried () {
+       public final function removeMarried () {
                unset($this->married);
        }
 }
                unset($this->married);
        }
 }
index a63ce111f1bd250c1033b3168db9c6f2a3519495..5671ee2a67515f62755185f849a34593af800df5 100644 (file)
@@ -33,7 +33,7 @@ class BaseSimulator extends BaseFrameworkSystem {
                // Set part description and class name
                $this->setPartDescr("Simulator-Basis-Einheit");
 
                // Set part description and class name
                $this->setPartDescr("Simulator-Basis-Einheit");
 
-               // Etwas aufraeumen, dies sollte ganz zum Schluss erfolgen!
+               // Clean up a little, dies sollte ganz zum Schluss erfolgen!
                $this->removeResizeFactorArray();
                $this->removeCurrPart();
                $this->removeCurrShip();
                $this->removeResizeFactorArray();
                $this->removeCurrPart();
                $this->removeCurrShip();
@@ -233,7 +233,7 @@ class BaseSimulator extends BaseFrameworkSystem {
                        ), 1);
                }
 
                        ), 1);
                }
 
-               // Nochmals etwas aufraeumen
+               // Nochmals Clean up a little
                $this->removeResizeFactorArray();
                $this->removeCurrShip();
                $this->removeCurrPart();
                $this->removeResizeFactorArray();
                $this->removeCurrShip();
                $this->removeCurrPart();
@@ -303,7 +303,7 @@ class BaseSimulator extends BaseFrameworkSystem {
        }
 
        // Getter-Methode fuer Element aus resizeFactor
        }
 
        // Getter-Methode fuer Element aus resizeFactor
-       public function getResizeFactorElement ($el) {
+       public final function getResizeFactorElement ($el) {
                if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] getResizeFactorElement erreicht. (element=%s)<br />\n",
                        $this->__toString(),
                        $el
                if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] getResizeFactorElement erreicht. (element=%s)<br />\n",
                        $this->__toString(),
                        $el
@@ -318,7 +318,7 @@ class BaseSimulator extends BaseFrameworkSystem {
        }
 
        // Setter-Methode fuer Element in resizeFactor
        }
 
        // Setter-Methode fuer Element in resizeFactor
-       public function setResizeFactorElement ($el, $value) {
+       public final function setResizeFactorElement ($el, $value) {
                if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Umberechnungsfaktor <strong>%s</strong>=<strong>%s</strong> gesetzt.<br />\n",
                        $this->__toString(),
                        $el,
                if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Umberechnungsfaktor <strong>%s</strong>=<strong>%s</strong> gesetzt.<br />\n",
                        $this->__toString(),
                        $el,
index b45e8eeb5c8b11d790479475dd53a3bae3c70cc6..3f13a6358564d95e7d391dde5d5b9ec4b0db705e 100644 (file)
@@ -39,7 +39,7 @@ class Merchant extends BaseFrameworkSystem {
                // String absichern
                $merchantName = (string) $merchantName;
 
                // String absichern
                $merchantName = (string) $merchantName;
 
-               // Instanz holen
+               // Get new instance
                $merchantInstance = new Merchant();
 
                // Debug message
                $merchantInstance = new Merchant();
 
                // Debug message
@@ -76,7 +76,7 @@ class Merchant extends BaseFrameworkSystem {
        }
 
        // Setter for merchant name
        }
 
        // Setter for merchant name
-       public function setMerchantName ($merchantName) {
+       public final function setMerchantName ($merchantName) {
                // Secure string
                $merchantName = (string) $merchantName;
 
                // Secure string
                $merchantName = (string) $merchantName;
 
@@ -90,7 +90,7 @@ class Merchant extends BaseFrameworkSystem {
        }
 
        // Getter for merchant name
        }
 
        // 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__,
                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
        }
 
        // 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__,
                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
        }
 
        // 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__,
                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
        }
 
        // 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
                $price = 0;
 
                // Iterate throw whole list
index c1e3dab65b97446c17156416c0ab1053805eadec..d2d4aecc705cc1e27cd22f209daba0ad0fe90fb5 100644 (file)
@@ -61,7 +61,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                        throw new MissingMethodException(array($partnerInstance, 'isContractPartner'), self::EXCEPTION_MISSING_METHOD);
                }
 
                        throw new MissingMethodException(array($partnerInstance, 'isContractPartner'), self::EXCEPTION_MISSING_METHOD);
                }
 
-               // Instanz holen
+               // Get new instance
                $contractInstance = new WorksContract();
 
                // Debug-Meldung ausgeben
                $contractInstance = new WorksContract();
 
                // Debug-Meldung ausgeben
@@ -127,7 +127,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
        }
 
        // Getter for ship name
        }
 
        // Getter for ship name
-       public function getShipName () {
+       public final function getShipName () {
                if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Schiffsname <strong>%s</strong> angefordert.<br />\n",
                        __CLASS__,
                        __LINE__,
                if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Schiffsname <strong>%s</strong> angefordert.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -137,7 +137,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
        }
 
        // Getter for ship instance
        }
 
        // Getter for ship instance
-       public function getShipInstance () {
+       public final function getShipInstance () {
                if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Schiff-Instanz angefordert.<br />\n",
                        __CLASS__,
                        __LINE__
                if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Schiff-Instanz angefordert.<br />\n",
                        __CLASS__,
                        __LINE__
@@ -258,27 +258,27 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
        }
 
        // Setter for contract partner
        }
 
        // Setter for contract partner
-       public function setContractPartner (ContractPartner $partnerInstance) {
+       public final function setContractPartner (ContractPartner $partnerInstance) {
                $this->contractPartner = $partnerInstance;
        }
 
        // Getter for contract partner
                $this->contractPartner = $partnerInstance;
        }
 
        // Getter for contract partner
-       public function getContractPartner () {
+       public final function getContractPartner () {
                return $this->contractPartner;
        }
 
        // Setter for contract party
                return $this->contractPartner;
        }
 
        // Setter for contract party
-       public function setContractParty (ContractPartner $partyInstance) {
+       public final function setContractParty (ContractPartner $partyInstance) {
                $this->contractParty = $partyInstance;
        }
 
        // Getter for contract party
                $this->contractParty = $partyInstance;
        }
 
        // Getter for contract party
-       public function getContractParty () {
+       public final function getContractParty () {
                return $this->contractParty;
        }
 
        // Setter for signature
                return $this->contractParty;
        }
 
        // Setter for signature
-       public function setSigned ($signed) {
+       public final function setSigned ($signed) {
                $this->signed = (boolean) $signed;
        }
 
                $this->signed = (boolean) $signed;
        }
 
@@ -336,17 +336,17 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
        }
 
        // Setter for merchant instance
        }
 
        // Setter for merchant instance
-       public function setMerchantInstance (Merchant $merchantInstance) {
+       public final function setMerchantInstance (Merchant $merchantInstance) {
                $this->merchantInstance = $merchantInstance;
        }
 
        // Getter for merchant instance
                $this->merchantInstance = $merchantInstance;
        }
 
        // Getter for merchant instance
-       public function getMerchantInstance () {
+       public final function getMerchantInstance () {
                return $this->merchantInstance;
        }
 
        // Getter for total price
                return $this->merchantInstance;
        }
 
        // Getter for total price
-       public function getTotalPrice () {
+       public final function getTotalPrice () {
                // Get ship instance
                $shipInstance = $this->getShipInstance();
 
                // Get ship instance
                $shipInstance = $this->getShipInstance();
 
index bac3bbfecd0eab85144a2aa8590c7e51b7616ba2..3fca7ead55b1f29b18f3b59c672bc25daf197eaf 100644 (file)
@@ -2,31 +2,51 @@
 
 // Die Reederei-Klasse
 class ShippingCompany extends BaseSimulator implements Customer, ContractPartner {
 
 // Die Reederei-Klasse
 class ShippingCompany extends BaseSimulator implements Customer, ContractPartner {
-       // Firmenname
+       /**
+        * Full name of this company
+        */
        private $companyName     = "Namenlose Reederei";
 
        private $companyName     = "Namenlose Reederei";
 
-       // Firmenkuerzel
+       /**
+        * Shorted name of this company
+        */
        private $shortName       = "";
 
        private $shortName       = "";
 
-       // Reederei-Gruender
+       /**
+        * Instance of the founder
+        */
        private $founderInstance = null;
 
        private $founderInstance = null;
 
-       // Angestellten-Liste
+       /**
+        * Employed people by this company
+        */
        private $employeeList    = null;
 
        private $employeeList    = null;
 
-       // Zugewiesener Hafen
+       /**
+        * Headquarter harbor instance
+        */
        private $hqInstance      = null;
 
        private $hqInstance      = null;
 
-       // Werftenliste
+       /**
+        * List of all assigned shipyards
+        */
        private $shipyardList   = null;
 
        private $shipyardList   = null;
 
-       // Der Reederei gehoerenden Schiffe
+       /**
+        * List of owned ships
+        */
        private $ownedShips      = null;
 
        private $ownedShips      = null;
 
-       // Bauauftraege als Kunde
+       /**
+        * Work constracts this company is currently working on
+        */
        private $contractList    = null;
 
        private $contractList    = null;
 
-       // Konstruktor
+       /**
+        * Main constructor
+        *
+        * @return      void
+        */
        private function __construct () {
                // Call parent constructor
                parent::constructor(__CLASS__);
        private function __construct () {
                // Call parent constructor
                parent::constructor(__CLASS__);
@@ -51,7 +71,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Reederei gruenden (create wegen Namenskonvention)
        public static function createShippingCompany ($companyName, Harbor $hqInstance) {
 
        // Reederei gruenden (create wegen Namenskonvention)
        public static function createShippingCompany ($companyName, Harbor $hqInstance) {
-               // Instanz holen
+               // Get new instance
                $companyInstance = new ShippingCompany();
 
                if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $companyInstance->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> wird gegr&uuml;ndet.<br />\n",
                $companyInstance = new ShippingCompany();
 
                if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $companyInstance->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> wird gegr&uuml;ndet.<br />\n",
@@ -78,7 +98,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                // Auftragsliste erstellen
                $companyInstance->createContractList();
 
                // Auftragsliste erstellen
                $companyInstance->createContractList();
 
-               // Etwas aufraeumen
+               // Clean up a little
                $companyInstance->removeWidth();
                $companyInstance->removeHeight();
                $companyInstance->removeLength();
                $companyInstance->removeWidth();
                $companyInstance->removeHeight();
                $companyInstance->removeLength();
@@ -120,17 +140,17 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
        }
 
        // Setter-Methode fuer Firmennamen
        }
 
        // Setter-Methode fuer Firmennamen
-       public function setCompanyName ($companyName) {
+       public final function setCompanyName ($companyName) {
                $this->companyName = (string) $companyName;
        }
 
        // Getter-Methode fuer Firmennamen
                $this->companyName = (string) $companyName;
        }
 
        // Getter-Methode fuer Firmennamen
-       public function getCompanyName () {
+       public final function getCompanyName () {
                return $this->companyName;
        }
 
        // Setter-Methode fuer Firmensitz
                return $this->companyName;
        }
 
        // Setter-Methode fuer Firmensitz
-       public function setHQInstance (Harbor $hqInstance) {
+       public final function setHQInstance (Harbor $hqInstance) {
                $this->hqInstance = $hqInstance;
        }
 
                $this->hqInstance = $hqInstance;
        }
 
@@ -165,7 +185,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
        }
 
        // Setter fuer Reederei-Gruender
        }
 
        // Setter fuer Reederei-Gruender
-       public function setCompanyFounder(CompanyEmployee $founderInstance) {
+       public final function setCompanyFounder(CompanyEmployee $founderInstance) {
                if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> ist von <strong>%s %s</strong> gegr&uuml;ndet worden.<br />\n",
                        __CLASS__,
                        __LINE__,
                if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> ist von <strong>%s %s</strong> gegr&uuml;ndet worden.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -177,7 +197,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
        }
 
        // Getter for founder instance
        }
 
        // Getter for founder instance
-       public function getFounderInstance () {
+       public final function getFounderInstance () {
                return $this->founderInstance;
        }
 
                return $this->founderInstance;
        }
 
@@ -327,7 +347,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
-                       } elseif (!$shipyard->isClass("Shipyard")) {
+                       } elseif (!$shipyard->isSameClass("Shipyard")) {
                                // Nope, so throw exception
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
                                // Nope, so throw exception
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
@@ -341,7 +361,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
        }
 
        // Getter for total employees
        }
 
        // Getter for total employees
-       public function getTotalEmployee () {
+       public final function getTotalEmployee () {
                // Count all...
                $total = $this->employeeList->count();
 
                // Count all...
                $total = $this->employeeList->count();
 
@@ -358,7 +378,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
        }
 
        // Getter for total shipyards
        }
 
        // Getter for total shipyards
-       public function getTotalShipyards () {
+       public final function getTotalShipyards () {
                if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] F&uuml;r die Reederei <strong>%s</strong> werden die Anzahl der Werften in allen H&auml;fen ermittelt.<br />\n",
                        __CLASS__,
                        __LINE__,
                if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] F&uuml;r die Reederei <strong>%s</strong> werden die Anzahl der Werften in allen H&auml;fen ermittelt.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -423,7 +443,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
-                       } elseif (!$shipyard->isClass("Shipyard")) {
+                       } elseif (!$shipyard->isSameClass("Shipyard")) {
                                // Class is not a shipyard
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
                                // Class is not a shipyard
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
@@ -498,7 +518,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
                        } elseif (!is_object($shipyard)) {
                                // Not an object! ;-(
                                throw new NoObjectException($shipyard, self::EXCEPTION_IS_NO_OBJECT);
-                       } elseif (!$shipyard->isClass("Shipyard")) {
+                       } elseif (!$shipyard->isSameClass("Shipyard")) {
                                // Class is not a shipyard
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
                                // Class is not a shipyard
                                throw new ClassMismatchException(array($shipyard->__toString(), "Shipyard"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                        }
@@ -540,7 +560,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
        }
 
        // Get latest added contract instance
        }
 
        // Get latest added contract instance
-       public function getLastContractInstance () {
+       public final function getLastContractInstance () {
                // Get iterator
                $iter = $this->contractList->getIterator();
 
                // Get iterator
                $iter = $this->contractList->getIterator();
 
@@ -596,7 +616,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
        }
 
        // Setter for merchant instance
        }
 
        // Setter for merchant instance
-       public function setMerchantInstance (Merchant $merchantInstance) {
+       public final function setMerchantInstance (Merchant $merchantInstance) {
                // Get contract
                $contractInstance = $this->getLastContractInstance();
 
                // Get contract
                $contractInstance = $this->getLastContractInstance();
 
@@ -606,7 +626,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                } elseif (!is_object($contractInstance)) {
                        // Not an object! ;-(
                        throw new NoObjectException($contractInstance, self::EXCEPTION_IS_NO_OBJECT);
                } elseif (!is_object($contractInstance)) {
                        // Not an object! ;-(
                        throw new NoObjectException($contractInstance, self::EXCEPTION_IS_NO_OBJECT);
-               } elseif (!$contractInstance->isClass('WorksContract')) {
+               } elseif (!$contractInstance->isSameClass('WorksContract')) {
                        // Is not a merchant
                        throw new ClassMismatchException(array($contractInstance->__toString(), "WorksContract"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                }
                        // Is not a merchant
                        throw new ClassMismatchException(array($contractInstance->__toString(), "WorksContract"), self::EXCEPTION_CLASSES_NOT_MATCHING);
                }
index 014d27853b91989848a845a65fbe04847fdf491b..8edd23d33476c3593d587a60d3d857327b28606a 100644 (file)
@@ -17,11 +17,16 @@ class BaseConstruction extends BaseSimulator {
                // Set description
                $this->setPartDescr("Namenlose Landkonstruktion");
 
                // Set description
                $this->setPartDescr("Namenlose Landkonstruktion");
 
-               // Etwas aufraeumen (brauchen wir hier nicht)
+               // Clean up a little
                $this->removeNumberFormaters();
        }
 
                $this->removeNumberFormaters();
        }
 
-       // Konstruktor aufrufen
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
        public function constructor ($class) {
                $this->__construct($class);
        }
index 2dd43ea568e817e1fa5c65f019775de5f7bfdf5e..2a687b0245eb2aeee06a9b4554609d5c13f66fd0 100644 (file)
@@ -63,13 +63,13 @@ class Harbor extends BaseConstruction {
        }
 
        // Setter fuer Hafennamen
        }
 
        // Setter fuer Hafennamen
-       public function setHarborName ($harborName) {
+       public final function setHarborName ($harborName) {
                if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen heisst jetzt <strong>%s</strong>.<br />\n", $harborName));
                $this->harborName = (string) $harborName;
        }
 
        // Getter fuer Hafennamen
                if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen heisst jetzt <strong>%s</strong>.<br />\n", $harborName));
                $this->harborName = (string) $harborName;
        }
 
        // Getter fuer Hafennamen
-       public function getHarborName () {
+       public final function getHarborName () {
                if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Hafenname <strong>%s</strong> wurde angefordert.<br />\n", $this->harborName));
                return $this->harborName;
        }
                if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Hafenname <strong>%s</strong> wurde angefordert.<br />\n", $this->harborName));
                return $this->harborName;
        }
index fa2dde0391f2ece5cc163ff6dde1da98f43d942e..641ffeed8c8ad44505fefd69862896d80f9aabb6 100644 (file)
@@ -86,7 +86,7 @@ class Shipyard extends BaseConstruction {
                $shipyardInstance->setHeight(30);
                $shipyardInstance->setLength(100);
 
                $shipyardInstance->setHeight(30);
                $shipyardInstance->setLength(100);
 
-               // Etwas aufraeumen
+               // Clean up a little
                $shipyardInstance->removeDraught();
                $shipyardInstance->removeSystemArray();
 
                $shipyardInstance->removeDraught();
                $shipyardInstance->removeSystemArray();
 
@@ -122,32 +122,32 @@ class Shipyard extends BaseConstruction {
        }
 
        // Setter-Methode fuer Werft-Name
        }
 
        // Setter-Methode fuer Werft-Name
-       public function setShipyardName ($shipyardName) {
+       public final function setShipyardName ($shipyardName) {
                $this->shipyardName = (string) $shipyardName;
        }
 
        // Getter-Methode fuer Werft-Name
                $this->shipyardName = (string) $shipyardName;
        }
 
        // Getter-Methode fuer Werft-Name
-       public function getShipyardName () {
+       public final function getShipyardName () {
                return $this->shipyardName;
        }
 
        // Setter-Methode fuer Hafen-Instanz
                return $this->shipyardName;
        }
 
        // Setter-Methode fuer Hafen-Instanz
-       public function setHarborInstance (Harbor $harborInstance) {
+       public final function setHarborInstance (Harbor $harborInstance) {
                $this->harborInstance = $harborInstance;
        }
 
        // Getter-Methode fuer Hafen-Instanz
                $this->harborInstance = $harborInstance;
        }
 
        // Getter-Methode fuer Hafen-Instanz
-       public function getHarborInstance () {
+       public final function getHarborInstance () {
                return $this->harborInstance;
        }
 
        // Setter fuer Reederei-Instanz
                return $this->harborInstance;
        }
 
        // Setter fuer Reederei-Instanz
-       public function setCompanyInstance (ShippingCompany $companyInstance) {
+       public final function setCompanyInstance (ShippingCompany $companyInstance) {
                $this->shippingCompany = $companyInstance;
        }
 
        // Getter fuer Reederei-Instanz
                $this->shippingCompany = $companyInstance;
        }
 
        // Getter fuer Reederei-Instanz
-       public function getCompanyInstance () {
+       public final function getCompanyInstance () {
                return $this->shippingCompany;
        }
 
                return $this->shippingCompany;
        }
 
index bda42a41f6f2cb31bdd7c5b4b67a1db101fdcb8c..ad52dd2390a89c5b0a079e3dedb455f2a082aee5 100644 (file)
@@ -25,18 +25,23 @@ class BaseDrive extends BaseSimulator {
                // Set description
                $this->setPartDescr("Namenloser Antrieb");
 
                // Set description
                $this->setPartDescr("Namenloser Antrieb");
 
-               // Etwas aufraeumen
+               // Clean up a little
                $this->removeNumberFormaters();
                $this->removePartInstance();
        }
 
                $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 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__,
                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
        }
 
        // 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__,
                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
        }
 
        // Setter for price
-       public function setPrice ($price) {
+       public final function setPrice ($price) {
                $this->price = (float) $price;
        }
 
        // Getter for price
                $this->price = (float) $price;
        }
 
        // Getter for price
-       public function getPrice () {
+       public final function getPrice () {
                return $this->price;
        }
 
                return $this->price;
        }
 
index 645741be4c723f4bc791b4b76f980fd086d5940f..42e75f4594bacbede9a144819c2846e49552d102 100644 (file)
@@ -27,7 +27,7 @@ class Motor extends BaseDrive implements ItemIsTradeable, ConstructableShipPart
 
        // Einen Motor erstellen
        public static function createMotor ($descr, $hp, $cams, $w, $h, $l) {
 
        // Einen Motor erstellen
        public static function createMotor ($descr, $hp, $cams, $w, $h, $l) {
-               // Instanz holen
+               // Get new instance
                $motorInstance = new Motor();
 
                // Debug message
                $motorInstance = new Motor();
 
                // Debug message
index becf6c829331aa8e8b81401e4676b17d410b6ca7..8a95e54f4bc059b65636a713925f664c686da170 100644 (file)
@@ -21,22 +21,27 @@ class BaseShipPart extends BaseSimulator {
                // Beschreibung
                $this->setPartDescr("Schiffsteil");
 
                // Beschreibung
                $this->setPartDescr("Schiffsteil");
 
-               // Etwas aufraeumen
+               // Clean up a little
                $this->removeNumberFormaters();
        }
 
                $this->removeNumberFormaters();
        }
 
-       // Konstruktor aufrufen
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
 
        // Setter for price
        public function constructor ($class) {
                $this->__construct($class);
        }
 
        // Setter for price
-       public function setPrice ($price) {
+       public final function setPrice ($price) {
                $this->price = (float) $price;
        }
 
        // Getter for price
                $this->price = (float) $price;
        }
 
        // Getter for price
-       public function getPrice () {
+       public final function getPrice () {
                return $this->price;
        }
 
                return $this->price;
        }
 
index 478ace61d92c16ffabdfb168df2bfe4664b441a8..f2ef225f7b1c4d19a18cb7638a17f1a113b09523 100644 (file)
@@ -27,7 +27,7 @@ class MaschineRoom extends BaseShipPart {
 
        // Maschinenraum erstellen
        public static function createMaschineRoom () {
 
        // Maschinenraum erstellen
        public static function createMaschineRoom () {
-               // Instanz holen
+               // Get new instance
                $roomInstance = new MaschineRoom();
 
                // Debug message
                $roomInstance = new MaschineRoom();
 
                // Debug message
index b46bb03dd01642a2e97ebd3d56b46a63796cd157..532ca3f394f20ba77f27aa9b075775e16bc188da 100644 (file)
@@ -55,7 +55,7 @@ class SimulatorPersonell extends BasePersonell {
         *
         * @param               $amountPersonell                Number of personell we shall
         *                                                              generate
         *
         * @param               $amountPersonell                Number of personell we shall
         *                                                              generate
-        * @return      $personellInstance              An instance of this object with a 
+        * @return      $personellInstance              An instance of this object with a
         *                                                              list of personells
         */
        public static function createSimulatorPersonell ($amountPersonell) {
         *                                                              list of personells
         */
        public static function createSimulatorPersonell ($amountPersonell) {
@@ -65,9 +65,6 @@ class SimulatorPersonell extends BasePersonell {
                // Get a new instance
                $personellInstance = new SimulatorPersonell();
 
                // Get a new instance
                $personellInstance = new SimulatorPersonell();
 
-               // Generate unique ID number
-               $personellInstance->createUniqueID();
-
                // Debug message
                if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] Es werden <strong>%d</strong> Personal bereitgestellt.<br />\n",
                        __CLASS__,
                // Debug message
                if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] Es werden <strong>%d</strong> Personal bereitgestellt.<br />\n",
                        __CLASS__,
@@ -80,7 +77,7 @@ class SimulatorPersonell extends BasePersonell {
 
                // Create requested amount of personell
                for ($idx = 0; $idx < $amountPersonell; $idx++) {
 
                // Create requested amount of personell
                for ($idx = 0; $idx < $amountPersonell; $idx++) {
-                       $personellInstance->addPersonell();
+                       $personellInstance->addRandomPersonell();
                }
 
                // Debug message
                }
 
                // Debug message
@@ -110,7 +107,7 @@ class SimulatorPersonell extends BasePersonell {
         * list from an existing database backend
         *
         * @param               $idNumber               The ID number (only right part) of the list
         * list from an existing database backend
         *
         * @param               $idNumber               The ID number (only right part) of the list
-        * @return      $personellInstance      An instance of 
+        * @return      $personellInstance      An instance of
         * @throws      InvalidIDFormatException                If the given id number
         *                                                                      $idNumber is invalid
         * @throws      NullPointerException            If a null pointer (instance)
         * @throws      InvalidIDFormatException                If the given id number
         *                                                                      $idNumber is invalid
         * @throws      NullPointerException            If a null pointer (instance)
@@ -201,7 +198,7 @@ class SimulatorPersonell extends BasePersonell {
        }
 
        // Add new personell object to our list
        }
 
        // Add new personell object to our list
-       public function addPersonell () {
+       public function addRandomPersonell () {
                // Gender list...
                $genders = array('M', 'F');
 
                // Gender list...
                $genders = array('M', 'F');
 
@@ -286,7 +283,7 @@ class SimulatorPersonell extends BasePersonell {
         *
         * @return      $count  Amount of unemployed personell
         */
         *
         * @return      $count  Amount of unemployed personell
         */
-       public function getAllUnemployed () {
+       public final function getAllUnemployed () {
                if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Es werden alle erwerbslosen Personen gesucht.<br />\n",
                        __CLASS__,
                        __LINE__
                if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Es werden alle erwerbslosen Personen gesucht.<br />\n",
                        __CLASS__,
                        __LINE__
@@ -379,7 +376,7 @@ class SimulatorPersonell extends BasePersonell {
         * @return      void
         */
        public function saveObjectToDatabase () {
         * @return      void
         */
        public function saveObjectToDatabase () {
-               // Get the database 
+               // Get the database
                $dbInstance = $this->getDatabaseInstance();
 
                // Prepare the limitation object. We just need the personellList array object.
                $dbInstance = $this->getDatabaseInstance();
 
                // Prepare the limitation object. We just need the personellList array object.
@@ -397,7 +394,7 @@ class SimulatorPersonell extends BasePersonell {
         *
         * @return      $personellList          The list of all personells
         */
         *
         * @return      $personellList          The list of all personells
         */
-       public function getPersonellList () {
+       public final function getPersonellList () {
                return $this->personellList;
        }
 
                return $this->personellList;
        }
 
index d7c394b1e7930bdc164dd551c3017f46ae199648..689374045f8117111e9f6ecffa494f00aee6ee45 100644 (file)
@@ -32,13 +32,18 @@ class BaseShip extends BaseSimulator {
 
                // Array-Objekt generieren
                $this->createStructuresArray();
 
                // Array-Objekt generieren
                $this->createStructuresArray();
+
                // Instanz entfernen
                $this->removePartInstance();
                $this->removeNumberFormaters();
        }
 
                // 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);
        }
        public function constructor ($class) {
                $this->__construct($class);
        }
@@ -156,7 +161,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Getter-Methode fuer Strukturen-Array
        }
 
        // Getter-Methode fuer Strukturen-Array
-       public function getStructuresArray () {
+       public final function getStructuresArray () {
                return $this->structures;
        }
 
                return $this->structures;
        }
 
@@ -167,7 +172,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Setter-Methode fuer Schiffsnamen
        }
 
        // Setter-Methode fuer Schiffsnamen
-       public function setShipName ($shipName) {
+       public final function setShipName ($shipName) {
                // Cast the string
                $shipName = (string) $shipName;
 
                // Cast the string
                $shipName = (string) $shipName;
 
@@ -184,7 +189,7 @@ class BaseShip extends BaseSimulator {
        }
 
        // Getter-Methode fuer Schiffsnamen
        }
 
        // 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__,
                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
        }
 
        // 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__,
                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
        }
 
        // 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__,
                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
        }
 
        // 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__,
                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__,
index 9c53ed96abc036abd286fb9a117a1b713a8aaaf3..c5dfc01891b20a0dcd75c6d7cdea783abfecabbb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
 <?php
 
-class PassengerShip extends BaseShip implements ConstructableShip {
+class PassengerShip extends BaseShip implements ConstructableShip, LimitableObject {
        // Konstruktor
        private function __construct () {
                // Eltern-Kontruktor aufrufen
        // Konstruktor
        private function __construct () {
                // Eltern-Kontruktor aufrufen
@@ -26,7 +26,7 @@ class PassengerShip extends BaseShip implements ConstructableShip {
 
        // Passagier-Schiff erstellen
        public static function createPassengerShip ($shipName) {
 
        // Passagier-Schiff erstellen
        public static function createPassengerShip ($shipName) {
-               // Instanz holen
+               // Get new instance
                $passInstance = new PassengerShip();
 
                // Debug message
                $passInstance = new PassengerShip();
 
                // Debug message
@@ -70,7 +70,7 @@ class PassengerShip extends BaseShip implements ConstructableShip {
 
                                // Debug-Meldung ausgeben?
                                if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) {
 
                                // Debug-Meldung ausgeben?
                                if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) {
-                                       // Instanz holen
+                                       // Get new instance
                                        $cabType = "Kabine ohne Namen";
                                        $cab = $el->getPartInstance();
                                        if (!is_null($cab)) {
                                        $cabType = "Kabine ohne Namen";
                                        $cab = $el->getPartInstance();
                                        if (!is_null($cab)) {
@@ -103,7 +103,7 @@ class PassengerShip extends BaseShip implements ConstructableShip {
                        $this->getShipName(),
                        $numBeds
                ));
                        $this->getShipName(),
                        $numBeds
                ));
-       
+
                // Anzahl zurueckliefern
                return $numBeds;
        }
                // Anzahl zurueckliefern
                return $numBeds;
        }
index 83c1d63ba916037074d4e36b5c7cc3095d10d0af..007f9bfffd8ff48259b651fb73f2a20d644bc833 100644 (file)
@@ -20,27 +20,32 @@ class BaseStructure extends BaseSimulator {
                // Set description
                $this->setPartDescr("Schiffsstrukturen");
 
                // Set description
                $this->setPartDescr("Schiffsstrukturen");
 
-               // Etwas aufraeumen
+               // Clean up a little
                $this->removeNumberFormaters();
        }
 
                $this->removeNumberFormaters();
        }
 
-       // Konstruktor aufrufen
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
 
        // Setter for price
        public function constructor ($class) {
                $this->__construct($class);
        }
 
        // Setter for price
-       public function setPrice ($price) {
+       public final function setPrice ($price) {
                $this->price = (float) $price;
        }
 
        // Getter for price
                $this->price = (float) $price;
        }
 
        // Getter for price
-       public function getPrice () {
+       public final function getPrice () {
                return $this->price;
        }
 
        // Remove price
                return $this->price;
        }
 
        // Remove price
-       public function removePrice () { 
+       public function removePrice () {
                unset($this->price);
        }
 }
                unset($this->price);
        }
 }
index 2500226300c668d522471f3909d271dff3f6347e..b12cfcde7daa93bb5a1809501ef1921433529072 100644 (file)
@@ -6,7 +6,7 @@ class BaseCabin extends BaseCabinStructure {
                // Call parent constructor
                parent::constructor($class);
 
                // 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__,
                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");
 
                // 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);
        }
 
        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?
        // Is this a cabin?
-       public function isCabin () {
-               return ($this->isClass("BaseCabin"));
+       public final function isCabin () {
+               return ($this->isSameClass("BaseCabin"));
        }
 
        /**
        }
 
        /**
index 47616dfc68be8b9c123bdca0abeb826974bc0e98..fadd15eef74452e0480bfc80c35db19c854e4a40 100644 (file)
@@ -26,7 +26,7 @@ class EconomyCabin extends BaseCabin implements ItemIsTradeable, ConstructableSh
 
        // Economy-Kabine erstellen
        public static function createEconomyCabin ($numLuxury, $numRooms, $numBeds, $dim) {
 
        // Economy-Kabine erstellen
        public static function createEconomyCabin ($numLuxury, $numRooms, $numBeds, $dim) {
-               // Instanz holen
+               // Get new instance
                $ecoInstance = new EconomyCabin();
 
                // Debug message
                $ecoInstance = new EconomyCabin();
 
                // Debug message
index de8393ad6c628fdb3802de44ae8b38b895d2ab85..b1707ab4931b73e4e3feb30b85c31e9f6739c137 100644 (file)
@@ -24,7 +24,7 @@ class LowCabin extends BaseCabin implements ItemIsTradeable, ConstructableShipPa
 
        // 2-Sterne-Klasse erstellen
        public static function createLowCabin ($numLuxury, $numRooms, $numBeds, $dim) {
 
        // 2-Sterne-Klasse erstellen
        public static function createLowCabin ($numLuxury, $numRooms, $numBeds, $dim) {
-               // Instanz holen
+               // Get new instance
                $lowInstance = new LowCabin();
 
                // Debug message
                $lowInstance = new LowCabin();
 
                // Debug message
index c7a6af07fa733ca2b3cb090ae0bbacecad469f1f..bc7066575b264c76dc52a98c6193f626ddaa3691 100644 (file)
@@ -24,7 +24,7 @@ class LuxuryCabin extends BaseCabin implements ItemIsTradeable, ConstructableShi
 
        // Eine Luxuskabine erstellen
        public static function createLuxuryCabin ($numLuxury, $numRooms, $numBeds, $dim) {
 
        // Eine Luxuskabine erstellen
        public static function createLuxuryCabin ($numLuxury, $numRooms, $numBeds, $dim) {
-               // Instanz holen
+               // Get new instance
                $luxuryInstance = new LuxuryCabin();
 
                // Debug message
                $luxuryInstance = new LuxuryCabin();
 
                // Debug message
index 31f9e6bfe8ad276bd9834b8a56f1fcff2fd29129..c7d846dcd683ea4a57003e3ba193472eb03bb328 100644 (file)
@@ -24,7 +24,7 @@ class PremierCabin extends BaseCabin implements ItemIsTradeable, ConstructableSh
 
        // Premier-Kabine erstellen
        public static function createPremierCabin ($numLuxury, $numRooms, $numBeds, $dim) {
 
        // Premier-Kabine erstellen
        public static function createPremierCabin ($numLuxury, $numRooms, $numBeds, $dim) {
-               // Instanz holen
+               // Get new instance
                $premierInstance = new PremierCabin();
 
                // Debug message
                $premierInstance = new PremierCabin();
 
                // Debug message
index b26f692fd94ef233037558c083be42e6aa412842..9f80e43511b8a70bebadf3e7fef3c1d5832c04ad 100644 (file)
@@ -28,7 +28,12 @@ class BaseCabinStructure extends BaseStructure {
                $this->setPartDescr("Kabinenstruktur");
        }
 
                $this->setPartDescr("Kabinenstruktur");
        }
 
-       // Konstruktor aufrufen
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
        public function constructor ($class) {
                $this->__construct($class);
        }
@@ -68,7 +73,7 @@ class BaseCabinStructure extends BaseStructure {
        }
 
        // Wrapper fuer setDeckInstance->setPartInstance
        }
 
        // Wrapper fuer setDeckInstance->setPartInstance
-       public function setDeckInstance ($deck) {
+       public final function setDeckInstance ($deck) {
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Wrapper setDeckInstance->setPartInstance erreicht.<br />\n",
                        __CLASS__,
                        __LINE__
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Wrapper setDeckInstance->setPartInstance erreicht.<br />\n",
                        __CLASS__,
                        __LINE__
@@ -77,7 +82,7 @@ class BaseCabinStructure extends BaseStructure {
        }
 
        // Getter-Methode fuer Anzahl Betten
        }
 
        // Getter-Methode fuer Anzahl Betten
-       public function getNumBeds () {
+       public final function getNumBeds () {
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Betten angefordert.<br />\n",
                        __CLASS__,
                        __LINE__,
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Betten angefordert.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -87,7 +92,7 @@ class BaseCabinStructure extends BaseStructure {
        }
 
        // Getter-Methode fuer Anzahl Kabinen
        }
 
        // Getter-Methode fuer Anzahl Kabinen
-       public function getNumCabin () {
+       public final function getNumCabin () {
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Kabine(n) angefordert.<br />\n",
                        __CLASS__,
                        __LINE__,
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Kabine(n) angefordert.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -97,7 +102,7 @@ class BaseCabinStructure extends BaseStructure {
        }
 
        // Setter-Methode fuer Anzahl Betten
        }
 
        // Setter-Methode fuer Anzahl Betten
-       public function setNumBeds ($numBeds) {
+       public final function setNumBeds ($numBeds) {
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Betten gesetzt.<br />\n",
                        __CLASS__,
                        __LINE__,
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Betten gesetzt.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -107,7 +112,7 @@ class BaseCabinStructure extends BaseStructure {
        }
 
        // Setter-Methode fuer Anzahl Raeume
        }
 
        // Setter-Methode fuer Anzahl Raeume
-       public function setNumRooms ($numRooms) {
+       public final function setNumRooms ($numRooms) {
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Raum/R&auml;ume gesetzt.<br />\n",
                        __CLASS__,
                        __LINE__,
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Raum/R&auml;ume gesetzt.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -117,7 +122,7 @@ class BaseCabinStructure extends BaseStructure {
        }
 
        // Setter-Methode fuer Anzahl Kabinen
        }
 
        // Setter-Methode fuer Anzahl Kabinen
-       public function setNumCabin ($numCabin) {
+       public final function setNumCabin ($numCabin) {
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Kabine(n) gesetzt.<br />\n",
                        __CLASS__,
                        __LINE__,
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Kabine(n) gesetzt.<br />\n",
                        __CLASS__,
                        __LINE__,
@@ -160,7 +165,7 @@ class BaseCabinStructure extends BaseStructure {
                $num  = $this->getNumCabin();
                $cabinBeds = $beds * $num;
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) {
                $num  = $this->getNumCabin();
                $cabinBeds = $beds * $num;
                if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) {
-                       // Instanz holen
+                       // Get new instance
                        $cabType = "Kabine ohne Namen";
                        $cab = $this->getPartInstance();
                        if (!is_null($cab)) {
                        $cabType = "Kabine ohne Namen";
                        $cab = $this->getPartInstance();
                        if (!is_null($cab)) {
index 7aee583a6e06eaf41aa60f2572f18fc581e86a4f..5c218cce55f78ea31808e71b8a995f11f9c601e9 100644 (file)
@@ -21,7 +21,12 @@ class BaseDeckStructure extends BaseStructure {
                $this->setPartDescr("Deckstruktur");
        }
 
                $this->setPartDescr("Deckstruktur");
        }
 
-       // Konstruktor aufrufen
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
        public function constructor ($class) {
                $this->__construct($class);
        }
@@ -60,12 +65,12 @@ class BaseDeckStructure extends BaseStructure {
        }
 
        // Setter-Methode fuer Anzahl Decks
        }
 
        // Setter-Methode fuer Anzahl Decks
-       public function setNumDecks($numDecks) {
+       public final function setNumDecks($numDecks) {
                $this->numDecks = (int) $numDecks;
        }
 
        // Getter-Methode fuer Anzahl Decks
                $this->numDecks = (int) $numDecks;
        }
 
        // Getter-Methode fuer Anzahl Decks
-       public function getNumDecks() {
+       public final function getNumDecks() {
                return $this->numDecks;
        }
 }
                return $this->numDecks;
        }
 }
index e4488cdd689f700e12dd87d1865aa20b6393209c..ee7264db65b9c6e43552cd24c6ce0d8aa7bfa34c 100644 (file)
@@ -18,11 +18,6 @@ class BaseUpperStructure extends BaseStructure {
 
                // Set description
                $this->setPartDescr("Aufbauten");
 
                // Set description
                $this->setPartDescr("Aufbauten");
-
-               // Shall we clean up?
-               if ($class == __CLASS__) {
-                       $this->removeSystemArray();
-               }
        }
 
        /**
        }
 
        /**
@@ -32,28 +27,6 @@ class BaseUpperStructure extends BaseStructure {
                $this->__construct($class);
        }
 
                $this->__construct($class);
        }
 
-       /**
-        * Creates an upper(=super) structure
-        */
-       public static function createBaseUpperStructure () {
-               // Instanz holen
-               $upperInstance = new BaseUpperStructure (__CLASS__);
-
-               // Debug message
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) {
-                       $upperInstance->getDebugInstance()->output(sprintf("[%s:%d] Aufbauten wird konstruiert.<br />\n",
-                               __CLASS__,
-                               __LINE__
-                       ));
-               }
-
-               // Unique-ID setzen
-               $upperInstance->createUniqueID();
-
-               // Return instance
-               return $upperInstance;
-       }
-
        /**
         * Stub!
         */
        /**
         * Stub!
         */
index e13619883d0c4a195b553cae05169a8c72e51a8d..110d360077d9db39eef930c15cab7fdfd35f0aab 100644 (file)
@@ -24,7 +24,7 @@ class CarDeck extends BaseDeck implements ItemIsTradeable, ConstructableShipPart
 
        // Autodeck erstellen
        public static function createCarDeck ($numDecks, $dim) {
 
        // Autodeck erstellen
        public static function createCarDeck ($numDecks, $dim) {
-               // Instanz holen
+               // Get new instance
                $carInstance = new CarDeck();
 
                // Debug message
                $carInstance = new CarDeck();
 
                // Debug message
@@ -56,12 +56,12 @@ class CarDeck extends BaseDeck implements ItemIsTradeable, ConstructableShipPart
        }
 
        // Setter-Methode fuer Anzahl Decks
        }
 
        // Setter-Methode fuer Anzahl Decks
-       public function setNumDecks($numDecks) {
+       public final function setNumDecks($numDecks) {
                parent::setNumDecks($numDecks);
        }
 
        // Getter-Methode fuer Anzahl Decks
                parent::setNumDecks($numDecks);
        }
 
        // Getter-Methode fuer Anzahl Decks
-       public function getNumDecks() {
+       public final function getNumDecks() {
                return parent::getNumDecks();
        }
 
                return parent::getNumDecks();
        }
 
index 85355116edc53e73926ae3022f13f4cb673c5c15..b643807148e6e08c4ea02566698de2e4c994b4fc 100644 (file)
@@ -24,7 +24,7 @@ class TrainDeck extends BaseDeck implements ItemIsTradeable, ConstructableShipPa
 
        // LKW-Deck erstellen
        public static function createTrainDeck ($numDecks, $dim) {
 
        // LKW-Deck erstellen
        public static function createTrainDeck ($numDecks, $dim) {
-               // Instanz holen
+               // Get new instance
                $trainInstance = new TrainDeck();
 
                // Debug message
                $trainInstance = new TrainDeck();
 
                // Debug message
@@ -56,12 +56,12 @@ class TrainDeck extends BaseDeck implements ItemIsTradeable, ConstructableShipPa
        }
 
        // Setter-Methode fuer Anzahl Decks
        }
 
        // Setter-Methode fuer Anzahl Decks
-       public function setNumDecks ($numDecks) {
+       public final function setNumDecks ($numDecks) {
                parent::setNumDecks($numDecks);
        }
 
        // Getter-Methode fuer Anzahl Decks
                parent::setNumDecks($numDecks);
        }
 
        // Getter-Methode fuer Anzahl Decks
-       public function getNumDecks() {
+       public final function getNumDecks() {
                return parent::getNumDecks();
        }
 
                return parent::getNumDecks();
        }
 
index 81d5d33d1d47984d78068a75ae5d427e4d53fb16..73207e559c8526d6fe6e382c77e526a90923b39c 100644 (file)
@@ -24,7 +24,7 @@ class TruckDeck extends BaseDeck implements ItemIsTradeable, ConstructableShipPa
 
        // LKW-Deck erstellen
        public static function createTruckDeck ($numDecks, $dim) {
 
        // LKW-Deck erstellen
        public static function createTruckDeck ($numDecks, $dim) {
-               // Instanz holen
+               // Get new instance
                $truckInstance = new TruckDeck();
 
                // Debug message
                $truckInstance = new TruckDeck();
 
                // Debug message
@@ -56,12 +56,12 @@ class TruckDeck extends BaseDeck implements ItemIsTradeable, ConstructableShipPa
        }
 
        // Setter-Methode fuer Anzahl Decks
        }
 
        // Setter-Methode fuer Anzahl Decks
-       public function setNumDecks ($numDecks) {
+       public final function setNumDecks ($numDecks) {
                parent::setNumDecks($numDecks);
        }
 
        // Getter-Methode fuer Anzahl Decks
                parent::setNumDecks($numDecks);
        }
 
        // Getter-Methode fuer Anzahl Decks
-       public function getNumDecks() {
+       public final function getNumDecks() {
                return parent::getNumDecks();
        }
 
                return parent::getNumDecks();
        }
 
index 30b6978dfa4e10304931c6b9e5219da918bef0f5..e72f96feacf0e7a4c26fe9a9c7d1f89d1f4ca5e4 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 <?php
-// Decks for cargo
+// General (base) deck
 class BaseDeck extends BaseDeckStructure {
        /**
 class BaseDeck extends BaseDeckStructure {
        /**
-       * Constructor for cargo decks in general
-       */
+        * Constructor for cargo decks in general
+        */
        private function __construct ($class) {
                // Call parent constructor
                parent::constructor($class);
        private function __construct ($class) {
                // Call parent constructor
                parent::constructor($class);
@@ -15,37 +15,19 @@ class BaseDeck extends BaseDeckStructure {
                ));
 
                // Set description
                ));
 
                // Set description
-               $this->setPartDescr("Deck");
-
-               // Maybe clean up?
-               if ($class == __CLASS__) {
-                       $this->removeSystemArray();
-               }
+               $this->setPartDescr("Allgemeines Deck");
        }
 
        }
 
-       // Ruft nur den privaten Konstruktor auf
+       /**
+        * Calls the private constructor
+        *
+        * @param       $class  The class' name
+        * @return      void
+        */
        public function constructor ($class) {
                $this->__construct($class);
        }
 
        public function constructor ($class) {
                $this->__construct($class);
        }
 
-       // Ein allgemeines Deck erstellen
-       public static function createBaseDeck () {
-               // Instanz holen
-               $deckInstance = new BaseDeck(__CLASS__);
-
-               // Debug message
-               if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $deckInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein allgemeines Deck wird konstruiert.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
-
-               // Unique-ID setzen
-               $deckInstance->createUniqueID();
-
-               // Instanz zurueckgeben
-               return $deckInstance;
-       }
-
        /**
         * Stub!
         */
        /**
         * Stub!
         */
index 9aefdcd6426d6d76c1064f89b7027fdfe4a4f3a6..80c43703918c17bc7b7e4579f84bcd9611a080cf 100644 (file)
@@ -25,7 +25,7 @@ class Bridge extends BaseUpperStructure implements ItemIsTradeable, Constructabl
 
        // Eine Kommandobruecke erstellen
        public static function createBridge ($width, $height, $length) {
 
        // Eine Kommandobruecke erstellen
        public static function createBridge ($width, $height, $length) {
-               // Instanz holen
+               // Get new instance
                $bridgeInstance = new Bridge();
 
                // Debug message
                $bridgeInstance = new Bridge();
 
                // Debug message
index 1e536a2013a172414ec2ea65d9063178d7030757..c1147db38a6ac403db7194c21d7b87b59763e6c3 100644 (file)
@@ -569,11 +569,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @return      boolean The result of comparing both's unique ID
         */
        public final function equals ($object) {
         * @return      boolean The result of comparing both's unique ID
         */
        public final function equals ($object) {
-               if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Ist <strong>%s</strong>=<strong>%s</strong>?<br />\n",
-                       $this->__toString(),
-                       $this->__toString(),
-                       $object->__toString()
-               ));
                return ($this->getUniqueID() == $object->getUniqueID());
        }
 
                return ($this->getUniqueID() == $object->getUniqueID());
        }
 
@@ -586,8 +581,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        public function itemMatches ($itemInstance) {
                return (
         */
        public function itemMatches ($itemInstance) {
                return (
-                          ($this->__toString()   == $itemInstance->__toString())
-                       && ($this->getPartDescr() == $itemInstance->getPartDescr())
+                       (
+                               $this->__toString()   == $itemInstance->__toString()
+                       ) && (
+                               $this->getPartDescr() == $itemInstance->getPartDescr()
+                       )
                );
        }
 
                );
        }
 
@@ -725,7 +723,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @throws      InvalidArrayCountException      If the array contains less or
         *                                                                      more than two elements
         */
         * @throws      InvalidArrayCountException      If the array contains less or
         *                                                                      more than two elements
         */
-       public function getPathFileNameFromObject () {
+       public final function getPathFileNameFromObject () {
                // Get the main object's unique ID. We use this as a path/filename combination
                $pathFile = $this->getUniqueID();
 
                // Get the main object's unique ID. We use this as a path/filename combination
                $pathFile = $this->getUniqueID();
 
index 55875a6de485ef9f38ad3e14e33dde83fc406677..231dfee213994edc114b4f10a76fad8070f91910 100644 (file)
@@ -404,7 +404,7 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
         * @throws      MissingMethodException                  If the required method
         *                                                                              toString() is missing
         */
         * @throws      MissingMethodException                  If the required method
         *                                                                              toString() is missing
         */
-       public function getObjectFromCachedData ($uniqueID) {
+       public final function getObjectFromCachedData ($uniqueID) {
                // Get instance for file handler
                $inputHandler = $this->getIOInstance();
 
                // Get instance for file handler
                $inputHandler = $this->getIOInstance();
 
index e202630baa67d9293672c254d9eb28b761a683ff..3798fa2c5b584b2126dea2765b8f2e14a0d71b49 100644 (file)
@@ -481,7 +481,7 @@ if (defined('DEBUG_COMPANY_OBJ')) {
        ));
 }
 
        ));
 }
 
-// Etwas aufraeumen
+// Clean up a little
 unset($einbauten);
 unset($part);
 unset($eval);
 unset($einbauten);
 unset($part);
 unset($eval);
@@ -521,7 +521,7 @@ DebugMiddleware::getInstance()->output(sprintf("Der Bau der <strong>%s</strong>
        $contract->formatCurrency($totalValue)
 ));
 
        $contract->formatCurrency($totalValue)
 ));
 
-// Etwas aufraeumen
+// Clean up a little
 unset($totalValue);
 
 // Den Bauvertrag unterschreiben (damit wird er in den Bau-Queue aufgenommen)
 unset($totalValue);
 
 // Den Bauvertrag unterschreiben (damit wird er in den Bau-Queue aufgenommen)