application/ship-simu/main/structures/extended/upper/class_Bridge.php -text
application/ship-simu/main/user/.htaccess -text
application/ship-simu/main/user/class_ShipSimuBaseUser.php -text
-application/ship-simu/main/user/class_ShipSimuGuest.php -text
-application/ship-simu/main/user/class_ShipSimuMember.php -text
application/ship-simu/main/user/extended/.htaccess -text
application/ship-simu/main/user/extended/class_ShipSimuGuest.php -text
application/ship-simu/main/user/extended/class_ShipSimuMember.php -text
application/ship-simu/templates/.htaccess -text
application/ship-simu/templates/de/.htaccess -text
application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp -text
+application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp -text
application/ship-simu/templates/de/code/action_ship_simu_login_logout.ctp -text
application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp -text
application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp -text
// CFG: SHIP-SIMU-LOGIN-FILL-PAYMENT-DISCOVERY
$cfg->setConfigEntry('ship_simu_login_refill_payment_discovery', "LocalPaymentDiscovery");
+// CFG: GOVERMENT-STARTUP-HELP-LIMIT
+$cfg->setConfigEntry('goverment_startup_help_limit', 3);
+
// [EOF]
?>
// Abort here
return false;
} // END - if
- die("OK!");
+
+ // Unfinised part
+ $this->partialStub("Unfinished method.");
}
}
}
/**
- * Checks wether the goverment has already payed a startup help to the
+ * Checks wether the goverment has already payed a training course for te
* current user
*
* @return $alreadyPayed Wether the goverment has already payed
*/
- public function ifGovermentAlreadyPayedStartupHelp () {
+ public function ifGovermentAlreadyPayedTraining () {
// Default is not payed
$alreadyPayed = false;
// Now get a search criteria and set the user's name as criteria
$criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
- $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserName());
+ $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId());
$criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
$criteriaInstance->setLimit(1);
// Was the query fine?
if ($resultInstance->getAffectedRows() === 1) {
- // Entry found!
+ // Entry was found so the goverment can no more pay a training
$alreadyPayed = true;
} // END - if
// Return the result
return $alreadyPayed;
}
+
+ /**
+ * Checks wether the goverment has payed maximum of startup helps to the
+ * current user
+ *
+ * @return $maximumPayed Wether the goverment has already payed
+ */
+ public function ifGovermentPayedMaxmimumStartupHelp () {
+ // Default is not payed
+ $maximumPayed = false;
+
+ // Cache startup help limit
+ $helpLimit = $this->getConfigInstance()->readConfig('goverment_startup_help_limit');
+
+ // Now get a search criteria and set the user's name as criteria
+ $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+ $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId());
+ $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
+ $criteriaInstance->setLimit($helpLimit);
+
+ // Get a wrapper instance
+ $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class');
+
+ // Get result back
+ $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
+
+ // Was the query fine?
+ if ($resultInstance->getAffectedRows() === $helpLimit) {
+ // Entry found, so lets have a look if this goverment wants to again...
+ $maximumPayed = true;
+ } // END - if
+
+ // Return the result
+ return $maximumPayed;
+ }
}
// [EOF]
return $hasRequired;
}
+ /**
+ * Determines if the goverment can still pay a "virtual training course" in general
+ *
+ * @return $ifGovHelps Wether if the goverment helps the user with a virtual training course
+ */
+ public function ifGovermentPaysTraining () {
+ // By default they want to help.
+ $ifGovHelps = true;
+
+ // First get a goverment instance from registry
+ $govermentInstance = Registry::getRegistry()->getInstance('goverment');
+
+ // Is it there?
+ if (is_null($govermentInstance)) {
+ // Then create a new one
+ $govermentInstance = ObjectFactory::createObjectByConfiguredName('goverment_class', array($this));
+
+ // Store it in registry
+ Registry::getRegistry()->addInstance('goverment', $govermentInstance);
+ } // END - if
+
+ // Then ask the goverment if they want to pay a "startup help" to the user
+ if ($govermentInstance->ifGovermentAlreadyPayedTraining()) {
+ // Training already given!
+ $ifGovHelps = false;
+ } // END - if
+
+ // Return result here
+ return $ifGovHelps;
+ }
+
/**
* Determines if the goverment can still pay a "startup help" to the user
*
- * @return $ifGovHelped Wether if the goverment has helped the user with startup
+ * @return $ifGovHelps Wether if the goverment helps the user with some startup money
*/
public function ifGovermentPaysStartupHelp () {
- // By default they have not payed, which is indeed good. ;-)
- $ifGovHelped = false;
+ // By default they want to help.
+ $ifGovHelps = true;
// First get a goverment instance from registry
$govermentInstance = Registry::getRegistry()->getInstance('goverment');
} // END - if
// Then ask the goverment if they want to pay a "startup help" to the user
- if ($govermentInstance->ifGovermentAlreadyPayedStartupHelp()) {
+ if ($govermentInstance->ifGovermentPayedMaxmimumStartupHelp()) {
// They can't pay anymore to the user (excited amount)
- $ifGovHelped = true;
+ $ifGovHelps = false;
} // END - if
// Return result here
- return $ifGovHelped;
+ return $ifGovHelps;
}
/**
* Checks wether the user can take points from the money bank
*
* @return $bankLends Wether the money bank is able to lend money
- * @todo Need to check the bank if they can generally lend money to the user
+ * @todo Need to implement MoneyBank::ifBankLendsMoreMoney()
*/
public function ifUserAllowedTakeCreditsFromMoneyBank () {
// Per default the money bank cannot pay
} // END - if
// Does the money bank lend more money?
- /** UNFINISHED PART!
+ /* UNFINISED:
if ($bankInstance->ifBankLendsMoreMoney()) {
// Okay, that they will do
$bankLends = true;
+++ /dev/null
-<?php
-/**
- * A special guest class for Ship-Simu
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class ShipSimuGuest extends ShipSimuBaseUser implements ManageableGuest, Registerable {
- // Exceptions
- const EXCEPTION_USERNAME_NOT_FOUND = 0x170;
- const EXCEPTION_USER_EMAIL_NOT_FOUND = 0x171;
- const EXCEPTION_USER_PASS_MISMATCH = 0x172;
-
- /**
- * Protected constructor
- *
- * @param $className Name of the class
- * @return void
- */
- protected function __construct ($className = "") {
- // Is the class name empty? Then this is not a specialized user class
- if (empty($className)) $className = __CLASS__;
-
- // Call parent constructor
- parent::__construct($className);
- }
-
- /**
- * Creates an instance of this user class by a provided username. This
- * factory method will check if the username is already taken and if not
- * so it will throw an exception.
- *
- * @param $userName Username we need a class instance for
- * @return $userInstance An instance of this user class
- * @throws UsernameMissingException If the username does not exist
- */
- public final static function createGuestByUsername ($userName) {
- // Get a new instance
- $userInstance = new ShipSimuGuest();
-
- // Set the username
- $userInstance->setUserName($userName);
-
- // Check if the username exists
- if (!$userInstance->ifUsernameExists()) {
- // Throw an exception here
- throw new UsernameMissingException(array($userInstance, $userName), self::EXCEPTION_USERNAME_NOT_FOUND);
- }
-
- // Return the instance
- return $userInstance;
- }
-
- /**
- * Creates an instance of this user class by a provided email address. This
- * factory method will not check if the email address is there.
- *
- * @param $email Email address of the user
- * @return $userInstance An instance of this user class
- */
- public final static function createGuestByEmail ($email) {
- // Get a new instance
- $userInstance = new ShipSimuGuest();
-
- // Set the username
- $userInstance->setEmail($email);
-
- // Return the instance
- return $userInstance;
- }
-
- /**
- * Updates the last activity timestamp and last performed action in the
- * database result. You should call flushPendingUpdates() to flush these updates
- * to the database layer.
- *
- * @param $requestInstance A requestable class instance
- * @return void
- */
- public function updateLastActivity (Requestable $requestInstance) {
- // No activity will be logged for guest accounts
- }
-
- /**
- * Flushs all pending updates to the database layer
- *
- * @return void
- */
- public function flushPendingUpdates () {
- // No updates will be flushed to database!
- }
-}
-
-// [EOF]
-?>
+++ /dev/null
-<?php
-/**
- * A special member class for Ship-Simu
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-class ShipSimuMember extends ShipSimuBaseUser implements ManageableMember, Registerable, Updateable {
- /**
- * Protected constructor
- *
- * @param $className Name of the class
- * @return void
- */
- protected function __construct ($className = "") {
- // Is the class name empty? Then this is not a specialized user class
- if (empty($className)) $className = __CLASS__;
-
- // Call parent constructor
- parent::__construct($className);
- }
-
- /**
- * Destructor to always flush updates
- *
- * @return void
- */
- public function __destruct () {
- // Flush any updated entries to the database
- $this->flushPendingUpdates();
-
- // Call parent destructor
- parent::__destruct();
- }
-
- /**
- * Creates an instance of this user class by a provided username. This
- * factory method will check if the username is already taken and if not
- * so it will throw an exception.
- *
- * @param $userName Username we need a class instance for
- * @return $userInstance An instance of this user class
- * @throws UsernameMissingException If the username does not exist
- */
- public final static function createMemberByUsername ($userName) {
- // Get a new instance
- $userInstance = new ShipSimuMember();
-
- // Set the username
- $userInstance->setUserName($userName);
-
- // Check if the username exists
- if (!$userInstance->ifUsernameExists()) {
- // Throw an exception here
- throw new UsernameMissingException(array($userInstance, $userName), self::EXCEPTION_USERNAME_NOT_FOUND);
- }
-
- // Return the instance
- return $userInstance;
- }
-
- /**
- * Creates an instance of this user class by a provided email address. This
- * factory method will not check if the email address is there.
- *
- * @param $email Email address of the user
- * @return $userInstance An instance of this user class
- */
- public final static function createMemberByEmail ($email) {
- // Get a new instance
- $userInstance = new ShipSimuMember();
-
- // Set the username
- $userInstance->setEmail($email);
-
- // Return the instance
- return $userInstance;
- }
-
- /**
- * Creates a user by a given request instance
- *
- * @param $requestInstance An instance of a Requestable class
- * @return $userInstance An instance of this user class
- */
- public final static function createMemberByRequest (Requestable $requestInstance) {
- // Determine if by email or username
- if (!is_null($requestInstance->getRequestElement('username'))) {
- // Username supplied
- $userInstance = self::createMemberByUserName($requestInstance->getRequestElement('username'));
- } elseif (!is_null($requestInstance->getRequestElement('email'))) {
- // Email supplied
- $userInstance = self::createMemberByEmail($requestInstance->getRequestElement('email'));
- } else {
- // Unsupported mode
- $userInstance = new ShipSimuMember();
- $userInstance->partialStub("We need to add more ways of creating user classes here.");
- $userInstance->debugBackTrace();
- exit();
- }
-
- // Return the prepared instance
- return $userInstance;
- }
-
- /**
- * Updates the last activity timestamp and last performed action in the
- * database result. You should call flushPendingUpdates() to flush these updates
- * to the database layer.
- *
- * @param $requestInstance A requestable class instance
- * @return void
- */
- public function updateLastActivity (Requestable $requestInstance) {
- // Set last action
- $lastAction = $requestInstance->getRequestElement('action');
-
- // If there is no action use the default on
- if (is_null($lastAction)) {
- $lastAction = $this->getConfigInstance()->readConfig('login_default_action');
- } // END - if
-
- // Get a critieria instance
- $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-
- // Add search criteria
- $searchInstance->addCriteria(UserDatabaseWrapper::DB_COLUMN_USERNAME, $this->getUserName());
- $searchInstance->setLimit(1);
-
- // Now get another criteria
- $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
-
- // And add our both entries
- $updateInstance->addCriteria('last_activity', date("Y-m-d H:i:s", time()));
- $updateInstance->addCriteria('last_action', $lastAction);
-
- // Add the search criteria for searching for the right entry
- $updateInstance->setSearchInstance($searchInstance);
-
- // Remember the update in database result
- $this->getResultInstance()->add2UpdateQueue($updateInstance);
- }
-
- /**
- * Flushs all pending updates to the database layer
- *
- * @return void
- */
- public function flushPendingUpdates () {
- // Do we have data to update?
- if ($this->getResultInstance()->ifDataNeedsFlush()) {
- // Get a database wrapper
- $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_db_wrapper_class');
-
- // Yes, then send the whole result to the database layer
- $wrapperInstance->doUpdateByResult($this->getResultInstance());
- } // END - if
- }
-}
-
-// [EOF]
-?>
* @return void
*/
public function flushPendingUpdates () {
+ // Is the object valid?
+ if (!$this->getResultInstance() instanceof SearchableResult) {
+ // Abort here
+ return;
+ } // END - if
+
// Do we have data to update?
if ($this->getResultInstance()->ifDataNeedsFlush()) {
// Get a database wrapper
// No more money left for founding company so place link here to refill page/money bank
if ($linkInstance->getValueInstance()->ifUserAllowedTakeCreditsFromMoneyBank()) {
// Display link to money bank page
- $linkInstance->addActionLink('moneybank', "Jetzt deinen Kredit tilgen.");
+ $linkInstance->addActionLink('moneybank', "Jetzt zur Bank gehen und mehr {?currency?} leihen.");
} elseif ($linkInstance->getValueInstance()->ifUserHasMaximumCreditsWithMoneyBank()) {
// Maximum credits reached which a money bank can lent
$linkInstance->addLinkNote("Die Bank kann dir kein Geld mehr leihen, bitte zahle es auch wieder zurück.");
}
// Add link group for goverment
-$linkInstance->addLinkGroup('goverment', "Bewerbe dich bei anderen Firmen und hole dir eine Starthilfe vom Staat ab wenn du nicht flüssig bist!");
+$linkInstance->addLinkGroup('goverment', "Bewerbe dich bei anderen Firmen und hole dir eine Starthilfe vom virtuellen Staat ab wenn du nicht flüssig bist!");
if ($linkInstance->getValueInstance()->ifUserHasRequiredPoints('write_applications')) {
// Enough money to write applications to other companies
$linkInstance->addActionLink('company_list', "Alle Firmen auflisten zum Bewerben.");
+} elseif ($linkInstance->getValueInstance()->ifGovermentPaysTraining()) {
+ // Goverment is able to pay a training in general
+ $linkInstance->addActionLink('goverment_training', "Jetzt zur virtuellen Kurswelt und ein Training auswählen.");
} elseif ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) {
// Display link to goverment for startup help
- $linkInstance->addActionLink('goverment&sub=request&request=startup_help', "Direkt zum Antragsformular für deine Starthilfe.");
+ $linkInstance->addActionLink('goverment_startup_help', "Direkt zum Antragsformular für deine Starthilfe.");
} else {
// Even goverment cannot help the gamer here
$linkInstance->addLinkNote("Leider kann dir der Staat nicht mehr weiterhelfen, dich zu bewerben, da du zu oft Starthilfen erhalten hast. Hier muss aber noch weiter am Spiel gearbeitet werden. :-)");
if ($linkInstance->getValueInstance()->ifUserAllowedTakeCreditsFromMoneyBank()) {
// Display link to money bank page
- $linkInstance->addActionLink('moneybank', "Jetzt deinen Kredit tilgen.");
+ $linkInstance->addActionLink('moneybank', "Jetzt zur virtuellen Bank gehen.");
} elseif ($linkInstance->getValueInstance()->ifUserHasMaximumCreditsWithMoneyBank()) {
// Maximum credits reached which a money bank can lent
$linkInstance->addLinkNote("Die Bank kann dir kein Geld mehr leihen, bitte zahle es auch wieder zurück.");
- $linkInstance->addActionLink('moneybank&sub=payback_credits', "Jetzt deinen Kredit tilgen.");
+ $linkInstance->addActionLink('moneybank_payback_credits', "Jetzt deinen Kredit tilgen.");
} else {
// Money bank is closed!
$linkInstance->addLinkNote("Die Bank hat derzeit geschlossen. Bitte später nochmal versuchen.");
--- /dev/null
+<?php
+// Get form helper instance
+$helper = WebFormHelper::createWebFormHelper($this, 'shipsimu_startup_form');
+
+// Add main form group
+$helper->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausfüllen!");
+
+// Flush the finished form
+$helper->flushContent();
+
+?>
+<div id="goverment_frame">
+ <div id="goverment_header">
+ Virtuelle Beantragung von Startuphilfe
+ </div>
+
+ <div id="goverment_form">
+ {?shipsimu_startup_form?}
+ </div>
+</div>
* @param $code Code number for the exception
* @return void
*/
- public function __construct ($dataArray, $code) {
- // Cast the array
- $dataArray = (array) $dataArray;
-
+ public function __construct (array $dataArray, $code) {
// Add a message around the missing class
$message = sprintf("[%s:%d] Getter-Methode für Attribut <span class=\"exception_reason\">%s</span> nicht gefunden.",
$dataArray[0]->__toString(),
/**
* Setter for the last read file
*
- * @param $fqfn The FQFN of the last read file
+ * @param $fqfn The FQFN of the last read file
* @return void
*/
private final function setLastFile ($fqfn) {
- // Cast string
- $fqfn = (string) $fqfn;
- $this->lastFile = $fqfn;
+ // Cast string and set it
+ $this->lastFile = (string) $fqfn;
}
/**
* @param $contents An array with header and data elements
* @return void
*/
- private final function setLastFileContents ($contents) {
- // Cast array
- $contents = (array) $contents;
+ private final function setLastFileContents (array $contents) {
+ // Set array
$this->lastContents = $contents;
}
// Initialize limit/skip
$limitFound = 0;
$skipFound = 0;
+ $idx = 1;
// Read the directory with some exceptions
while (($dataFile = $directoryInstance->readDirectoryExcept(array(".", "..", ".htaccess", ".svn", "info." . $this->getFileExtension()))) && ($limitFound < $criteriaInstance->getLimit())) {
if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
// Skip this file!
continue;
- }
+ } // END - if
// Read the file
$dataArray = $this->getDataArrayFromFile($pathName . $dataFile);
} // END - if
} // END - if
+ // Set id number
+ $dataArray['__idx'] = $idx;
+
// Entry found!
$resultData['rows'][] = $dataArray;
+
+ // Count found entries up
$limitFound++;
break;
} // END - if
// Throw an exception here
throw new SqlException(array($this, sprintf("File '%s' contains invalid data.", $dataFile), self::DB_CODE_DATA_FILE_CORRUPT), self::EXCEPTION_SQL_QUERY);
}
+
+ // Count entry up
+ $idx++;
} // END - while
// Close directory and throw the instance away
const EXCEPTION_CLIENT_USERNAME_NOT_FOUND = 0x180;
// Constants for database columns
+ const DB_COLUMN_USERID = "userid";
const DB_COLUMN_USERNAME = "username";
const DB_COLUMN_EMAIL = "email";
const DB_COLUMN_CONFIRM_HASH = "confirm_hash";
$userEmail = $userInstance->getField('email');
// Are they different?
- if ($userEmail != $email1) {
- // Update the "new_email" field
- $this->partialStub("Unfinished part.");
+ if ($userEmail == $email1) {
+ // Nothing has been changed is fine...
+ return true;
} // END - if
+
+ // Update the "new_email" field
+ $this->partialStub("Unfinished part.");
}
}
*/
private $userName = "";
+ /**
+ * User id of current user
+ */
+ private $userId = 0;
+
/**
* Email of current user
*/
* @return void
*/
public final function setUserName ($userName) {
- $this->userName = $userName;
+ $this->userName = (string) $userName;
}
/**
- * Setter for email
+ * Getter for username
*
- * @param $email The email to set
+ * @return $userName The username to get
+ */
+ public final function getUserName () {
+ return $this->userName;
+ }
+
+ /**
+ * Setter for user id
+ *
+ * @param $userId The user id to set
* @return void
+ * @todo Find a way of casting here. "(int)" might destroy the user id > 32766
*/
- protected final function setEmail ($email) {
- $this->email = $email;
+ public final function setUserId ($userId) {
+ $this->userId = $userId;
}
/**
- * Getter for username
+ * Getter for user id
*
- * @return $userName The username to get
+ * @return $userId The user id to get
*/
- public final function getUsername () {
- return $this->userName;
+ public final function getUserId () {
+ return $this->userId;
+ }
+
+ /**
+ * Setter for email
+ *
+ * @param $email The email to set
+ * @return void
+ */
+ protected final function setEmail ($email) {
+ $this->email = (string) $email;
}
/**
$criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
// Add the username as a criteria and set limit to one entry
- $criteriaInstance->addCriteria(UserDatabaseWrapper::DB_COLUMN_USERNAME, $this->getUsername());
+ $criteriaInstance->addCriteria(UserDatabaseWrapper::DB_COLUMN_USERNAME, $this->getUserName());
+ $criteriaInstance->setIndexSolution(UserDatabaseWrapper::DB_COLUMN_USERID, array($this, 'setUserId'));
$criteriaInstance->setLimit(1);
// Get a search result
// Add the username as a criteria and set limit to one entry
$criteriaInstance->addCriteria(UserDatabaseWrapper::DB_COLUMN_EMAIL, $this->getEmail());
+ $criteriaInstance->setIndexSolution(UserDatabaseWrapper::DB_COLUMN_USERID, array($this, 'setUserId'));
$criteriaInstance->setLimit(1);
// Get a search resultInstance
// Add the username as a criteria and set limit to one entry
$criteriaInstance->addCriteria(UserDatabaseWrapper::DB_COLUMN_USERNAME, $this->getUserName());
+ $criteriaInstance->setIndexSolution(UserDatabaseWrapper::DB_COLUMN_USERID, array($this, 'setUserId'));
$criteriaInstance->setLimit(1);
// Get a search resultInstance
try {
$personell = SimulatorPersonell::createSimulatorPersonellByID('SimulatorPersonell@829292aeca3f6bf78c16e25fc4f75c98');
} catch (InvalidIDFormatException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (FileIsEmptyException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (FilePointerNotOpenedException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidMD5ChecksumException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidDataLengthException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidSimulatorIDException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MismatchingCompressorsException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerItemIsNullException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerItemIsNoArrayException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerMaybeDamagedException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
$harbor = Harbor::createHarbor("Hamburger Hafen");
// Name ausgeben
-DebugMiddleware::getInstance()->output(sprintf("Der <strong>%s</strong> ist gegründet worden.<br />\n",
+DebugMiddleware::getInstance()->output(sprintf("Der <span class=\"exception_reason\">%s</span> ist gegründet worden.<br />\n",
$harbor->getHarborName()
));
// Hafen-Objekt debuggen
if (defined('DEBUG_HARBOR_OBJ')) {
- DebugMiddleware::getInstance()->output(sprintf("Der <strong>%s</strong> sieht wie folgt aus:<br />
+ DebugMiddleware::getInstance()->output(sprintf("Der <span class=\"exception_reason\">%s</span> sieht wie folgt aus:<br />
<pre>%s</pre>\n",
$harbor->getHarborName(),
print_r($harbor, true)
$item .= sprintf("%f, ", $subPart);
} else {
// Unsupport part found
- die(sprintf("[Main:] Unsupported sub-array element on pos <strong>%d</strong> in array <strong>%s</strong> found: <u>%s</u>", $idx2, $idx, $subPart));
+ die(sprintf("[Main:] Unsupported sub-array element on pos <strong>%d</strong> in array <span class=\"exception_reason\">%s</span> found: <u>%s</u>", $idx2, $idx, $subPart));
}
}
// Run the constructed command
eval($eval);
} catch (ItemNotTradeableException $e) {
- die(sprintf("[Main:] Die Preisliste des Händlers <strong>%s</strong> kann nicht befüllt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Preisliste des Händlers <span class=\"exception_reason\">%s</span> kann nicht befüllt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$merchant->getMerchantName(),
$e->getMessage()
));
// Haendler-Objekt debuggen
if (defined('DEBUG_MERCHANT_OBJ')) {
- DebugMiddleware::getInstance()->output(sprintf("Der Händler <strong>%s</strong> sieht wie folgt aus:<br />
+ DebugMiddleware::getInstance()->output(sprintf("Der Händler <span class=\"exception_reason\">%s</span> sieht wie folgt aus:<br />
<pre>%s</pre>\n",
$merchant->getMerchantName(),
print_r($merchant, true)
try {
$shipping->setCompanyFounder(CompanyEmployee::createCompanyEmployee("Roland", "Häder", "M", 1977, 9, 26, true, 2000));
} catch (BirthdayInvalidException $e) {
- die(sprintf("[Main:] Reederei-Gründer konnte nicht gesetzt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Reederei-Gründer konnte nicht gesetzt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
// Dann mal ausgeben...
-DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> ist von <strong>%s %s</strong> gegründet worden.<br />\n",
+DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> ist von <strong>%s %s</strong> gegründet worden.<br />\n",
$shipping->getCompanyName(),
$shipping->getFounderInstance()->getSurname(),
$shipping->getFounderInstance()->getFamily()
try {
$shipping->recruitRandomEmployees(10, $personell);
} catch (ToMuchEmployeesException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> konnte kein Personal einstellen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> konnte kein Personal einstellen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (OutOfBoundsException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> konnte kein Personal einstellen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> konnte kein Personal einstellen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
}
// Anzahl Personal ausgeben
-DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> hat nun <strong>%d</strong> weitere Mitarbeiter.<br />\n",
+DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> hat nun <strong>%d</strong> weitere Mitarbeiter.<br />\n",
$shipping->getCompanyName(),
$shipping->getTotalEmployee()
));
try {
$shipping->addShipTypeToAllShipyards("PassengerShip");
} catch (ClassNotFoundException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> kann ihre Werften nicht beschäftigen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> kann ihre Werften nicht beschäftigen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (ClassMismatchException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> kann ihre Werften nicht beschäftigen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> kann ihre Werften nicht beschäftigen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> kann ihre Werften nicht beschäftigen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> kann ihre Werften nicht beschäftigen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
try {
$shipping->distributeAllPersonellOnShipyards();
} catch (NoShipyardsConstructedException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> konnte kein Personal den Werften zuteilen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> konnte kein Personal den Werften zuteilen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (ClassMismatchException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> konnte kein Personal den Werften zuteilen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> konnte kein Personal den Werften zuteilen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> konnte kein Personal den Werften zuteilen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> konnte kein Personal den Werften zuteilen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> konnte kein Personal den Werften zuteilen. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> konnte kein Personal den Werften zuteilen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
}
// Normale Meldung ausgeben
-DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> beschäftigt nun ihre <strong>%d</strong> Mitarbeiter in <strong>%d</strong> Werft(en):<br />\n",
+DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> beschäftigt nun ihre <strong>%d</strong> Mitarbeiter in <strong>%d</strong> Werft(en):<br />\n",
$shipping->getCompanyName(),
$shipping->getTotalEmployee(),
$shipping->getTotalShipyards()
try {
$shipping->addNewWorksContract(WorksContract::createWorksContract("PassengerShip", "M/S Poseidon", $shipping));
} catch (ClassNotFoundException $e) {
- die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (EmptyStructuresListException $e) {
- die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Bauauftrag konnte nicht erstellt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
try {
$shipping->setMerchantInstance($merchant);
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Der Händler <strong>%s</strong> konnte nicht ausgewählt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Händler <span class=\"exception_reason\">%s</span> konnte nicht ausgewählt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$merchant->getMerchantName(),
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Der Händler <strong>%s</strong> konnte nicht ausgewählt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Händler <span class=\"exception_reason\">%s</span> konnte nicht ausgewählt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$merchant->getMerchantName(),
$e->getMessage()
));
} catch (ClassMismatchException $e) {
- die(sprintf("[Main:] Der Händler <strong>%s</strong> konnte nicht ausgewählt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Händler <span class=\"exception_reason\">%s</span> konnte nicht ausgewählt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$merchant->getMerchantName(),
$e->getMessage()
));
try {
$typeValid = $shipping->validateWorksContractShipType($contract);
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> konnte den Bauauftrag nicht validieren. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> konnte den Bauauftrag nicht validieren. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Die Reederei <strong>%s</strong> konnte den Bauauftrag nicht validieren. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> konnte den Bauauftrag nicht validieren. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
// Kann gebaut werden?
if ($typeValid) {
- DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> kann Schiffe vom Typ <strong>%s</strong> bauen.<br />\n",
+ DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> kann Schiffe vom Typ <span class=\"exception_reason\">%s</span> bauen.<br />\n",
$shipping->getCompanyName(),
$contract->getShipInstance()->getObjectDescription()
));
} else {
- DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> kann keine Schiffe vom Typ <strong>%s</strong> bauen!<br />\n",
+ DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> kann keine Schiffe vom Typ <span class=\"exception_reason\">%s</span> bauen!<br />\n",
$shipping->getCompanyName(),
$contract->getShipInstance()->getObjectDescription()
));
// Output message
die($e->getMessage());
} catch (ItemNotInPriceListException $e) {
- die(sprintf("[Main:] Der Artikel <strong>%s</strong> konnte nicht in der Preisliste gefunden werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Artikel <span class=\"exception_reason\">%s</span> konnte nicht in der Preisliste gefunden werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$key,
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Der Artikel <strong>%s</strong> konnte nicht in der Preisliste gefunden werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Der Artikel <span class=\"exception_reason\">%s</span> konnte nicht in der Preisliste gefunden werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$key,
$e->getMessage()
));
// Reederei-Objekt ausgeben
if (defined('DEBUG_COMPANY_OBJ')) {
- DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> sieht wie folgt aus:<br />
+ DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> sieht wie folgt aus:<br />
<pre>%s</pre>\n",
$shipping->getCompanyName(),
print_r($shipping, true)
try {
$totalValue = $contract->getTotalPrice();
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (EmptyStructuresListException $e) {
- die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (TotalPriceNotCalculatedException $e) {
- die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Gesamtbestellwert nicht ermittelbar. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
// Wert ausgeben
-DebugMiddleware::getInstance()->output(sprintf("Der Bau der <strong>%s</strong> wird der Reederei <strong>%s</strong> voraussichtlich <strong>%s</strong> kosten.<br />\n",
+DebugMiddleware::getInstance()->output(sprintf("Der Bau der <span class=\"exception_reason\">%s</span> wird der Reederei <span class=\"exception_reason\">%s</span> voraussichtlich <span class=\"exception_reason\">%s</span> kosten.<br />\n",
$contract->getShipInstance()->getShipName(),
$shipping->getCompanyName(),
$contract->formatCurrency($totalValue)
try {
$shipping->signContract($contract, $shipping);
} catch (NullPointerException $e) {
- die(sprintf("[Main:] The shipping company <strong>%s</strong> was not able to sign the contract for the following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] The shipping company <span class=\"exception_reason\">%s</span> was not able to sign the contract for the following reason: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] The shipping company <strong>%s</strong> was not able to sign the contract for the following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] The shipping company <span class=\"exception_reason\">%s</span> was not able to sign the contract for the following reason: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] The shipping company <strong>%s</strong> was not able to sign the contract for the following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] The shipping company <span class=\"exception_reason\">%s</span> was not able to sign the contract for the following reason: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (InvalidContractPartnerException $e) {
- die(sprintf("[Main:] The shipping company <strong>%s</strong> was not able to sign the contract for the following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] The shipping company <span class=\"exception_reason\">%s</span> was not able to sign the contract for the following reason: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (ContractAllreadySignedException $e) {
- die(sprintf("[Main:] The shipping company <strong>%s</strong> was not able to sign the contract for the following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] The shipping company <span class=\"exception_reason\">%s</span> was not able to sign the contract for the following reason: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
} catch (WrongContractPartnerException $e) {
- die(sprintf("[Main:] The shipping company <strong>%s</strong> was not able to sign the contract for the following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] The shipping company <span class=\"exception_reason\">%s</span> was not able to sign the contract for the following reason: <span class=\"exception_reason\">%s</span><br />\n",
$shipping->getCompanyName(),
$e->getMessage()
));
// Meldung ausgeben
if ($contract->isSigned()) {
- DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> hat den Bau der <strong>%s</strong> zugestimmt.<br />\n",
+ DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> hat den Bau der <span class=\"exception_reason\">%s</span> zugestimmt.<br />\n",
$shipping->getCompanyName(),
$contract->getShipInstance()->getShipName()
));
} else {
- DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong> hat den Bau der <strong>%s</strong> abgelehnt.<br />\n",
+ DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> hat den Bau der <span class=\"exception_reason\">%s</span> abgelehnt.<br />\n",
$shipping->getCompanyName(),
$contract->getShipInstance()->getShipName()
));
try {
$totalBeds = $contract->getShipInstance()->calcTotalBeds();
} catch (StructuresOutOfBoundsException $e) {
- die(sprintf("[Main:] Anzahl Betten konnten nicht ermittelt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Anzahl Betten konnten nicht ermittelt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (EmptyStructuresListException $e) {
- die(sprintf("[Main:] Anzahl Betten konnten nicht ermittelt werden. Grund: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Anzahl Betten konnten nicht ermittelt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
try {
$personell = SimulatorPersonell::createSimulatorPersonellByID('SimulatorPersonell@829292aeca3f6bf78c16e25fc4f75c98');
} catch (InvalidIDFormatException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (FileIsEmptyException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (FilePointerNotOpenedException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidMD5ChecksumException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidDataLengthException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidSimulatorIDException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MismatchingCompressorsException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerItemIsNullException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerItemIsNoArrayException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerMaybeDamagedException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
try {
$personell = SimulatorPersonell::createSimulatorPersonell(20);
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Personal list not created for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Personal list not created for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Personal list not created for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
try {
$personell->saveObjectToDatabase();
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidObjectException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (UnsupportedLimitationPartException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (GetterNotFoundException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoArrayCreatedException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
try {
$personell = SimulatorPersonell::createSimulatorPersonellByID('SimulatorPersonell@829292aeca3f6bf78c16e25fc4f75c98');
} catch (InvalidIDFormatException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (FileIsEmptyException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (FilePointerNotOpenedException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidMD5ChecksumException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidDataLengthException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidSimulatorIDException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MismatchingCompressorsException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerItemIsNullException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerItemIsNoArrayException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (ContainerMaybeDamagedException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
try {
$personell = SimulatorPersonell::createSimulatorPersonell(20);
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Personal list not created for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Personal list not created for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Personal list not created for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}
try {
$personell->saveObjectToDatabase();
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidObjectException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (UnsupportedLimitationPartException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (GetterNotFoundException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (NoArrayCreatedException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Object not saved for following reason: <strong>%s</strong><br />\n",
+ die(sprintf("[Main:] Object not saved for following reason: <span class=\"exception_reason\">%s</span><br />\n",
$e->getMessage()
));
}