]> git.mxchange.org Git - shipsimu.git/blob - application/ship-simu/main/structures/class_BaseStructure.php
83c1d63ba916037074d4e36b5c7cc3095d10d0af
[shipsimu.git] / application / ship-simu / main / structures / class_BaseStructure.php
1 <?php
2 // Konstruktionen allgemein (also Aufbauten/Unterbauten)
3 class BaseStructure extends BaseSimulator {
4         // Price of this structure
5         private $price = 0.00;
6
7         // Konstruktor (hier keine Exceptions aendern!)
8         private function __construct ($class) {
9                 // Call parent constructor
10                 parent::constructor($class);
11
12                 // Debug message
13                 if (((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
14                         $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
15                                 __CLASS__,
16                                 __LINE__
17                         ));
18                 }
19
20                 // Set description
21                 $this->setPartDescr("Schiffsstrukturen");
22
23                 // Etwas aufraeumen
24                 $this->removeNumberFormaters();
25         }
26
27         // Konstruktor aufrufen
28         public function constructor ($class) {
29                 $this->__construct($class);
30         }
31
32         // Setter for price
33         public function setPrice ($price) {
34                 $this->price = (float) $price;
35         }
36
37         // Getter for price
38         public function getPrice () {
39                 return $this->price;
40         }
41
42         // Remove price
43         public function removePrice () { 
44                 unset($this->price);
45         }
46 }
47
48 // [EOF]
49 ?>