7 require(dirname(dirname(__FILE__)) . "/inc/config.php");
9 // Load all include files
10 require(PATH . "inc/includes.php");
12 // Load all game classes
13 require(PATH . "inc/classes.php");
15 // Load more include files
16 $_GET['app'] = "ship-simu";
17 require_once(PATH . "inc/selector.php");
19 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
20 // jetzt die Personalliste wiederherstellen
22 $test = SimulatorPersonell::createSimulatorPersonellByID("SimulatorPersonell@829292aeca3f6bf78c16e25fc4f75c98");
23 } catch (InvalidIDFormatException $e) {
24 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
27 } catch (InvalidArrayCountException $e) {
28 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
31 } catch (NullPointerException $e) {
32 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
35 } catch (NoObjectException $e) {
36 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
39 } catch (MissingMethodException $e) {
40 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
43 } catch (FileIsEmptyException $e) {
44 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
47 } catch (FilePointerNotOpenedException $e) {
48 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
51 } catch (InvalidArrayCountException $e) {
52 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
55 } catch (InvalidMD5ChecksumException $e) {
56 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
59 } catch (InvalidDataLengthException $e) {
60 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
63 } catch (InvalidSimulatorIDException $e) {
64 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
67 } catch (MismatchingCompressorsException $e) {
68 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
71 } catch (ContainerItemIsNullException $e) {
72 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
75 } catch (ContainerItemIsNoArrayException $e) {
76 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
79 } catch (ContainerMaybeDamagedException $e) {
80 die(sprintf("[Main:] Die Personenliste konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
85 // Personal-Objekt debuggen
86 if (defined('DEBUG_PERSONELL_OBJ')) {
87 echo sprintf("Das Personal-Objekt sieht wie folgt aus:<br />
93 // Erstmal bis hier hin
96 // Etwas zum Testen...
98 $test = SimulatorPersonell::createSimulatorPersonell(20);
99 } catch (NullPointerException $e) {
100 die(sprintf("[Main:] Personenliste nicht angelegt. Grund: <strong>%s</strong><br />\n",
103 } catch (NoObjectException $e) {
104 die(sprintf("[Main:] Personenliste nicht angelegt. Grund: <strong>%s</strong><br />\n",
107 } catch (MissingMethodException $e) {
108 die(sprintf("[Main:] Personenliste nicht angelegt. Grund: <strong>%s</strong><br />\n",
113 // Personal-Objekt debuggen
114 if (defined('DEBUG_PERSONELL_OBJ')) {
115 echo sprintf("Das Personal-Objekt sieht wie folgt aus:<br />
121 // Try to save the object (for testing purposes)
123 $test->saveObjectToDatabase();
124 } catch (NullPointerException $e) {
125 die(sprintf("[Main:] Objekt nicht gespeichert. Grund: <strong>%s</strong><br />\n",
128 } catch (NoObjectException $e) {
129 die(sprintf("[Main:] Objekt nicht gespeichert. Grund: <strong>%s</strong><br />\n",
132 } catch (InvalidObjectException $e) {
133 die(sprintf("[Main:] Objekt nicht gespeichert. Grund: <strong>%s</strong><br />\n",
136 } catch (MissingMethodException $e) {
137 die(sprintf("[Main:] Objekt nicht gespeichert. Grund: <strong>%s</strong><br />\n",
140 } catch (UnsupportedLimitationPartException $e) {
141 die(sprintf("[Main:] Objekt nicht gespeichert. Grund: <strong>%s</strong><br />\n",
144 } catch (GetterNotFoundException $e) {
145 die(sprintf("[Main:] Objekt nicht gespeichert. Grund: <strong>%s</strong><br />\n",
148 } catch (NoArrayCreatedException $e) {
149 die(sprintf("[Main:] Objekt nicht gespeichert. Grund: <strong>%s</strong><br />\n",
152 } catch (InvalidArrayCountException $e) {
153 die(sprintf("[Main:] Objekt nicht gespeichert. Grund: <strong>%s</strong><br />\n",