X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fdrives%2Fclass_BaseDrive.php;h=385a200672173d8e11c80ee6163695f3d2ec3083;hb=ec3f744e23fa07132d0c5f435f1f4d75b8d5c481;hp=ce8d9e4c348d24a1c569cf679a8b49872161a03b;hpb=2a157996efd680b87b0a84cc95b91619ea6e81d9;p=shipsimu.git diff --git a/application/ship-simu/main/drives/class_BaseDrive.php b/application/ship-simu/main/drives/class_BaseDrive.php index ce8d9e4..385a200 100644 --- a/application/ship-simu/main/drives/class_BaseDrive.php +++ b/application/ship-simu/main/drives/class_BaseDrive.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 @@ -19,7 +19,7 @@ * 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 . + * along with this program. If not, see . */ class BaseDrive extends BaseSimulator { // Price of this drive @@ -30,53 +30,18 @@ class BaseDrive extends BaseSimulator { private $numCams = 0; // Konstruktor - private function __construct ($class) { + protected function __construct ($className) { // Call parent constructor - parent::constructor($class); - - // Debug message - if (((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) { - $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.
\n", - __CLASS__, - __LINE__ - )); - } - - // Set description - $this->setPartDescr("Namenloser Antrieb"); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removePartInstance(); - } - - /** - * Calls the private constructor - * - * @param $class The class' name - * @return void - */ - public function constructor ($class) { - $this->__construct($class); + parent::__construct($className); } // Setter-Methode fuert PS-Zahl public final function setHorsePower ($hp) { - if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Antriebsleistung wird auf %d PS gesetzt.
\n", - __CLASS__, - __LINE__, - $hp - )); $this->horsePower = (int) $hp; } // Setter-Methode fuer Nockenanzahl public final function setNumCams ($cams) { - if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Nockenanzahl wird auf %d Nocken gesetzt.
\n", - __CLASS__, - __LINE__, - $cams - )); $this->numCams = (int) $cams; } @@ -90,7 +55,7 @@ class BaseDrive extends BaseSimulator { return $this->price; } - public function removePrice () { + public final function removePrice () { unset($this->price); } }