00001 <?php 00024 class BaseStructure extends BaseSimulator { 00025 // Price of this structure 00026 private $price = 0.00; 00027 00028 // Konstruktor (hier keine Exceptions aendern!) 00029 protected function __construct ($className) { 00030 // Call parent constructor 00031 parent::__construct($className); 00032 } 00033 00034 // Setter for price 00035 public final function setPrice ($price) { 00036 $this->price = (float) $price; 00037 } 00038 00039 // Getter for price 00040 public final function getPrice () { 00041 return $this->price; 00042 } 00043 00044 // Remove price 00045 public final function removePrice () { 00046 unset($this->price); 00047 } 00048 } 00049 00050 // [EOF] 00051 ?>
1.5.6