New interface SignableContract introduced, some comments translated
[shipsimu.git] / application / ship-simu / main / structures / extended / cabines / ship / class_PremierCabin.php
1 <?php
2 // Premier-Kabinen
3 class PremierCabin extends BaseCabin implements ItemIsTradeable, ConstructableShipPart {
4         // Konstruktor
5         private function __construct () {
6                 // Call parent constructor
7                 parent::constructor(__CLASS__);
8
9                 // Debug message
10                 if (((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[PremierCabin:] Konstruktor erreicht.<br />\n",
11                         __CLASS__,
12                         __LINE__
13                 ));
14
15                 // Set description
16                 $this->setPartDescr("Premier-Class-Kabine");
17
18                 // Generate unique ID number
19                 $this->createUniqueID();
20
21                 // Clean up a little
22                 $this->removeSystemArray();
23         }
24
25         // Premier-Kabine erstellen
26         public static function createPremierCabin ($numLuxury, $numRooms, $numBeds, $dim) {
27                 // Instanz holen
28                 $premierInstance = new PremierCabin();
29
30                 // Debug message
31                 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $premierInstance->getDebugInstance()->output("[PremierCabin:] Eine Premier-Kabine wird konstruiert...<br />\n");
32
33                 // Abmasse extrahieren
34                 $premierInstance->extractDimensions($dim);
35
36                 // Den Rest auch setzen
37                 $premierInstance->setNumCabin($numLuxury);
38                 $premierInstance->setNumRooms($numRooms);
39                 $premierInstance->setNumBeds($numBeds);
40
41                 // Nicht noetig!
42                 $premierInstance->removePartInstance();
43
44                 // Instanz zurueckgeben
45                 return $premierInstance;
46         }
47
48         // Loesch-Methode fuer Anzahl Betten
49         public function removeNumBeds() {
50                 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Betten gel&ouml;scht.<br />\n",
51                         __CLASS__,
52                         __LINE__
53                 ));
54                 unset($this->numBeds);
55                 parent::removeNumBeds();
56         }
57
58         // Loesch-Methode fuer Anzahl Kabinen
59         public function removeNumCabin() {
60                 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Kabinen gel&ouml;scht.<br />\n",
61                         __CLASS__,
62                         __LINE__
63                 ));
64                 unset($this->numCabin);
65                 parent::removeNumCabin();
66         }
67
68         // Loesch-Methode fuer Anzahl Raeume
69         public function removeNumRooms() {
70                 if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl R&auml;ume gel&ouml;scht.<br />\n",
71                         __CLASS__,
72                         __LINE__
73                 ));
74                 unset($this->numRooms);
75                 parent::removeNumRooms();
76         }
77
78         // Overwritten method for tradeable items
79         public function isTradeable () {
80                 return true;
81         }
82
83         /**
84          * Limits this object with an ObjectLimits instance
85          */
86         public function limitObject (ObjectLimits $limitInstance) {
87                 ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
88         }
89 }
90
91 // [EOF]
92 ?>