(no commit message)
[shipsimu.git] / application / ship-simu / main / structures / extended / upper / class_Bridge.php
1 <?php
2 // Die Aufbauten allgemein
3 class Bridge extends BaseUpperStructure implements ItemIsTradeable, ConstructableShipPart {
4         // Constructor
5         private function __construct () {
6                 // Eltern-Konstruktor aufrufen
7                 parent::constructor(__CLASS__);
8
9                 // Debug message
10                 if (((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
11                         __CLASS__,
12                         __LINE__
13                 ));
14
15                 // Beschreibung setzen
16                 $this->setPartDescr("Br&uuml;cke");
17
18                 // Unique-ID erzeugen
19                 $this->createUniqueID();
20
21                 // Clean up a little
22                 $this->removeSystemArray();
23                 $this->removePartInstance();
24         }
25
26         // Eine Kommandobruecke erstellen
27         public static function createBridge ($width, $height, $length) {
28                 // Instanz holen
29                 $bridgeInstance = new Bridge();
30
31                 // Debug message
32                 if ((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) $bridgeInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Br&uuml;cke wird konstruiert...<br />\n",
33                         __CLASS__,
34                         __LINE__
35                 ));
36
37                 // Abmasse setzen
38                 $bridgeInstance->setWidth($width);
39                 $bridgeInstance->setHeight($height);
40                 $bridgeInstance->setLength($length);
41
42                 // Instanz zurueckgeben
43                 return $bridgeInstance;
44         }
45
46         // Overwritten method for tradeable items
47         public function isTradeable () {
48                 return true;
49         }
50
51         /**
52          * Stub!
53          */
54         public function saveObjectToDatabase () {
55                 $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
56                         $this->__toString(),
57                         __FUNCTION__
58                 ));
59         }
60
61         /**
62          * Limits this object with an ObjectLimits instance
63          */
64         public function limitObject (ObjectLimits $limitInstance) {
65                 ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
66         }
67 }
68
69 // [EOF]
70 ?>