X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fstructures%2Fextended%2Fclass_BaseCabinStructure.php;h=d0c0aaa8b0326484e08bf4df7e0ff028db2eeace;hp=31253aef2942264559b8ad3e13d45a2eed416189;hb=efba981c9bf18c733dfde945b09111ff4b6007ce;hpb=1d128d8532290e84885d09d2d3f0060abd08e49e diff --git a/application/ship-simu/main/structures/extended/class_BaseCabinStructure.php b/application/ship-simu/main/structures/extended/class_BaseCabinStructure.php index 31253ae..d0c0aaa 100644 --- a/application/ship-simu/main/structures/extended/class_BaseCabinStructure.php +++ b/application/ship-simu/main/structures/extended/class_BaseCabinStructure.php @@ -4,9 +4,9 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org + * @link http://www.ship-simu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,17 +33,9 @@ class BaseCabinStructure extends BaseStructure { private $numBeds = 0; // Konstruktor - protected function __construct ($class) { + protected function __construct ($className) { // Call parent constructor - parent::__construct($class); - - // Debug message - if (((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) { - $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.
\n", - __CLASS__, - __LINE__ - )); - } + parent::__construct($className); // Set description $this->setObjectDescription("Kabinenstruktur"); @@ -51,7 +43,7 @@ class BaseCabinStructure extends BaseStructure { // Kabine hinzufuegen public function addShipPartToShip (ConstructableShip $shipInstance, ConstructableShipPart $cabinInstance) { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Kabine %s wird für das Schiff %s konstruiert.
\n", + if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->debugOutput(sprintf("[%s:%d] Die Kabine %s wird für das Schiff %s konstruiert.", __CLASS__, __LINE__, $cabinInstance->getObjectDescription(), @@ -75,7 +67,7 @@ class BaseCabinStructure extends BaseStructure { $this->setDeckInstance($cabinInstance); // Einbaut-Meldung ausgeben - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Kabine %s wurde in das Schiff eingebaut.
\n", + if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->debugOutput(sprintf("[%s:%d] Die Kabine %s wurde in das Schiff eingebaut.", __CLASS__, __LINE__, $cabinInstance->getObjectDescription(), @@ -85,87 +77,46 @@ class BaseCabinStructure extends BaseStructure { // Wrapper fuer setDeckInstance->setPartInstance public final function setDeckInstance ($deck) { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Wrapper setDeckInstance->setPartInstance erreicht.
\n", - __CLASS__, - __LINE__ - )); parent::setPartInstance($deck); } // Getter-Methode fuer Anzahl Betten public final function getNumBeds () { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %d Betten angefordert.
\n", - __CLASS__, - __LINE__, - $this->numBeds - )); return $this->numBeds; } // Getter-Methode fuer Anzahl Kabinen public final function getNumCabin () { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %d Kabine(n) angefordert.
\n", - __CLASS__, - __LINE__, - $this->numCabin - )); return $this->numCabin; } // Setter-Methode fuer Anzahl Betten public final function setNumBeds ($numBeds) { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %d Betten gesetzt.
\n", - __CLASS__, - __LINE__, - $numBeds - )); $this->numBeds = $numBeds; } // Setter-Methode fuer Anzahl Raeume public final function setNumRooms ($numRooms) { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %d Raum/Räume gesetzt.
\n", - __CLASS__, - __LINE__, - $numRooms - )); $this->numRooms = $numRooms; } // Setter-Methode fuer Anzahl Kabinen public final function setNumCabin ($numCabin) { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %d Kabine(n) gesetzt.
\n", - __CLASS__, - __LINE__, - $numCabin - )); $this->numCabin = $numCabin; } // Loesch-Methode fuer Anzahl Betten public final function removeNumBeds() { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Betten gelöscht.
\n", - __CLASS__, - __LINE__ - )); unset($this->numBeds); } // Loesch-Methode fuer Anzahl Kabinen public final function removeNumCabin() { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Kabinen gelöscht.
\n", - __CLASS__, - __LINE__ - )); unset($this->numCabin); } // Loesch-Methode fuer Anzahl Raeume public final function removeNumRooms() { - if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Räume gelöscht.
\n", - __CLASS__, - __LINE__ - )); unset($this->numRooms); } @@ -185,7 +136,7 @@ class BaseCabinStructure extends BaseStructure { } // Debug-Meldung ausgeben - $this->getDebugInstance()->output(sprintf("[%s:%d] Es exisitieren %d Kabinen vom Typ %s zu je %d Betten. Das sind %d Betten.
\n", + $this->debugOutput(sprintf("[%s:%d] Es exisitieren %d Kabinen vom Typ %s zu je %d Betten. Das sind %d Betten.", __CLASS__, __LINE__, $num,