]> git.mxchange.org Git - shipsimu.git/blobdiff - ship-simu/application/ship-simu/main/structures/extended/decks/class_BaseDeck.php
Initial import of current development status
[shipsimu.git] / ship-simu / application / ship-simu / main / structures / extended / decks / class_BaseDeck.php
diff --git a/ship-simu/application/ship-simu/main/structures/extended/decks/class_BaseDeck.php b/ship-simu/application/ship-simu/main/structures/extended/decks/class_BaseDeck.php
new file mode 100644 (file)
index 0000000..ba1a32f
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+// Decks for cargo
+class BaseDeck extends BaseDeckStructure {
+       /**
+       * Constructor for cargo decks in general
+       */
+       private function __construct ($class) {
+               // Eltern-Konstruktor aufrufen
+               parent::constructor($class);
+
+               // Debub message
+               if (((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
+                       __CLASS__,
+                       __LINE__
+               ));
+
+               // Beschreibung setzen
+               $this->setPartDescr("Deck");
+
+               // Maybe clean up?
+               if ($class == __CLASS__) {
+                       $this->removeSystemArray();
+               }
+       }
+
+       // Ruft nur den privaten Konstruktor auf
+       public function constructor ($class) {
+               $this->__construct($class);
+       }
+
+       // Ein allgemeines Deck erstellen
+       public static function createBaseDeck () {
+               // Instanz holen
+               $deckInstance = new BaseDeck(__CLASS__);
+
+               // Debug message
+               if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $deckInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein allgemeines Deck wird konstruiert.<br />\n",
+                       __CLASS__,
+                       __LINE__
+               ));
+
+               // Unique-ID setzen
+               $deckInstance->createUniqueID();
+
+               // Instanz zurueckgeben
+               return $deckInstance;
+       }
+
+       /**
+        * Stub!
+        */
+       public function saveObjectToDatabase () {
+               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
+                       $this->__toString(),
+                       __FUNCTION__
+               ));
+       }
+}
+
+// [EOF]
+?>