X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fconstructions%2Fyards%2Fclass_Shipyard.php;h=29084843a2294ceb728f2a2e011ff9787e42839b;hb=1d128d8532290e84885d09d2d3f0060abd08e49e;hp=9d555dd18465c73aaad13892553e79b885129d1a;hpb=ff66822b5fb6a92f5dc8af55290ecb89ec7f1aaf;p=shipsimu.git diff --git a/application/ship-simu/main/constructions/yards/class_Shipyard.php b/application/ship-simu/main/constructions/yards/class_Shipyard.php index 9d555dd..2908484 100644 --- a/application/ship-simu/main/constructions/yards/class_Shipyard.php +++ b/application/ship-simu/main/constructions/yards/class_Shipyard.php @@ -1,6 +1,27 @@ + * @version 0.0.0 + * @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 + * + * 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ class Shipyard extends BaseConstruction { // Werft-Name private $shipyardName = "Namenlose Werft"; @@ -24,9 +45,9 @@ class Shipyard extends BaseConstruction { private $shippingCompany = null; // Constructor - private function __construct () { - // Eltern-Konstruktor aufrufen - parent::constructor(__CLASS__); + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); // Debug message if (((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) { @@ -36,19 +57,19 @@ class Shipyard extends BaseConstruction { )); } - // Beschreibung setzen - $this->setPartDescr("Werft"); + // Set description + $this->setObjectDescription("Werft"); // Staff-Liste/Schiffstyp-Liste erzeugen $this->createStaffList(); $this->createShipTypeList(); - // Unique-ID erzeugen + // Generate unique ID number $this->createUniqueID(); } // Create a shipyard and notify it about it's owner - public static function createShipyardNotify (Harbor $harborInstance, $shipyardName, ShippingCompany $companyInstance) { + public final static function createShipyardNotify (Harbor $harborInstance, $shipyardName, ShippingCompany $companyInstance) { // Werft-Instanz holen $shipyardInstance = self::createShipyard($harborInstance, $shipyardName); @@ -86,7 +107,7 @@ class Shipyard extends BaseConstruction { $shipyardInstance->setHeight(30); $shipyardInstance->setLength(100); - // Etwas aufraeumen + // Clean up a little $shipyardInstance->removeDraught(); $shipyardInstance->removeSystemArray(); @@ -122,32 +143,32 @@ class Shipyard extends BaseConstruction { } // Setter-Methode fuer Werft-Name - public function setShipyardName ($shipyardName) { + public final function setShipyardName ($shipyardName) { $this->shipyardName = (string) $shipyardName; } // Getter-Methode fuer Werft-Name - public function getShipyardName () { + public final function getShipyardName () { 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 - public function getHarborInstance () { + public final function getHarborInstance () { 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 - public function getCompanyInstance () { + public final function getCompanyInstance () { return $this->shippingCompany; }