X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fparts%2Fclass_BaseShipPart.php;h=fa2776ba0e488bec2e8278c9fc01b03dc1e6a7e0;hp=f2096525ad42c7b603b953e49ad29255234f9800;hb=d2ab4e266a9ba039dc587ffa753a55328ca34f4a;hpb=2a157996efd680b87b0a84cc95b91619ea6e81d9
diff --git a/application/ship-simu/main/parts/class_BaseShipPart.php b/application/ship-simu/main/parts/class_BaseShipPart.php
index f209652..fa2776b 100644
--- a/application/ship-simu/main/parts/class_BaseShipPart.php
+++ b/application/ship-simu/main/parts/class_BaseShipPart.php
@@ -19,42 +19,24 @@
* 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 BaseShipPart extends BaseSimulator {
// Price of this ship part
private $price = 0.00;
// Konstruktor
- private function __construct($class) {
+ protected function __construct($class) {
// Call parent constructor
- parent::constructor($class);
-
- // Debug message
- if (((defined('DEBUG_SHIPPART')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
- $this->getDebugInstance()->output(sprintf("[%s:%d:] Kontruktor erreicht.
\n",
- __CLASS__,
- __LINE__
- ));
- }
+ parent::__construct($class);
// Beschreibung
- $this->setPartDescr("Schiffsteil");
+ $this->setObjectDescription("Schiffsteil");
// Clean up a little
$this->removeNumberFormaters();
}
- /**
- * Calls the private constructor
- *
- * @param $class The class' name
- * @return void
- */
- public function constructor ($class) {
- $this->__construct($class);
- }
-
// Setter for price
public final function setPrice ($price) {
$this->price = (float) $price;
@@ -66,7 +48,7 @@ class BaseShipPart extends BaseSimulator {
}
// Remove price
- public function removePrice () {
+ public final function removePrice () {
unset($this->price);
}
}