'public static final' is correct
[shipsimu.git] / application / ship-simu / main / structures / extended / decks / cargo / class_TruckDeck.php
1 <?php
2 /**
3  * A truck and bus decks. Also other vehicle may be put in here if they don't
4  * match into the car deck.
5  *
6  * @author              Roland Haeder <webmaster@ship-simu.org>
7  * @version             0.0.0
8  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Ship-Simu Developer Team
9  * @license             GNU GPL 3.0 or any newer version
10  * @link                http://www.ship-simu.org
11  *
12  * This program is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation, either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program. If not, see <http://www.gnu.org/licenses/>.
24  */
25 class TruckDeck extends BaseDeck implements TradeableItem, ConstructableShipPart {
26         // Konstruktor
27         protected function __construct () {
28                 // Call parent constructor
29                 parent::__construct(__CLASS__);
30         }
31
32         // LKW-Deck erstellen
33         public static final function createTruckDeck ($numDecks, $dim) {
34                 // Get new instance
35                 $truckInstance = new TruckDeck();
36
37                 // Abmasse extrahieren
38                 $truckInstance->extractDimensions($dim);
39
40                 // Andere Daten uebetragen
41                 $truckInstance->setNumDecks($numDecks);
42
43                 // Nicht noetige Instanz
44                 $truckInstance->removePartInstance();
45
46                 // Instanz zurueckliefern
47                 return $truckInstance;
48         }
49
50         // Overwritten method for tradeable items
51         public function isTradeable () {
52                 return true;
53         }
54 }
55
56 // [EOF]
57 ?>