Again, a commit! ;-)
authorRoland Häder <roland@mxchange.org>
Thu, 13 Nov 2008 20:32:23 +0000 (20:32 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 13 Nov 2008 20:32:23 +0000 (20:32 +0000)
- Maximum count of startup helps the goverment is willing to pay added
- User id partly added (stub message)
- Some other minor rewrites

18 files changed:
.gitattributes
application/ship-simu/config.php
application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php
application/ship-simu/main/goverment/class_SimplifiedGoverment.php
application/ship-simu/main/user/class_ShipSimuBaseUser.php
application/ship-simu/main/user/class_ShipSimuGuest.php [deleted file]
application/ship-simu/main/user/class_ShipSimuMember.php [deleted file]
application/ship-simu/main/user/extended/class_ShipSimuMember.php
application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp
application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp [new file with mode: 0644]
inc/classes/exceptions/main/class_GetterNotFoundException.php
inc/classes/main/database/databases/class_LocalFileDatabase.php
inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php
inc/classes/main/filter/change/class_EmailChangeFilter.php
inc/classes/main/user/class_BaseUser.php
tests/old/contract-test.php
tests/old/loader-test.php
tests/old/personell-test.php

index 08509297d20c5e0a5796153b6dd71f64bd7faba0..57f3ab728de3130f962d9f35085bbfccee32bbd7 100644 (file)
@@ -251,8 +251,6 @@ application/ship-simu/main/structures/extended/upper/.htaccess -text
 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
@@ -263,6 +261,7 @@ application/ship-simu/starter.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
index dd52a7b4dde8f2c8bdf9d693e8448d96c616f073..b2f3f3236ef2780f7ac67b39dce0ff050d289cf1 100644 (file)
@@ -310,5 +310,8 @@ $cfg->setConfigEntry('refill_page_min_currency_amount', 1000);
 // 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]
 ?>
index 02833a4c18375efbf3752b6a922359e40cc68b45..76fe612dae3e3b9b1c1eea98f63b1b79028553d2 100644 (file)
@@ -69,7 +69,9 @@ class RefillRequestValidatorFilter extends BaseFrameworkSystem implements Filter
                        // Abort here
                        return false;
                } // END - if
-               die("OK!");
+
+               // Unfinised part
+               $this->partialStub("Unfinished method.");
        }
 }
 
index ccdc373a7ef3745a6c151dbf8cec99fcc5978477..7f122d415fd6c88f770c44faa8283fcbb33e8bb8 100644 (file)
@@ -58,18 +58,18 @@ class SimplifiedGoverment extends BaseFrameworkSystem implements Registerable {
        }
 
        /**
-        * 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);
 
@@ -81,13 +81,48 @@ class SimplifiedGoverment extends BaseFrameworkSystem implements Registerable {
 
                // 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]
index 22ccc55b401f7dc4295f7e365e68c31c86378a22..61feb281fb6c692228661361bf7414db6f56a4a6 100644 (file)
@@ -89,14 +89,45 @@ class ShipSimuBaseUser extends BaseUser implements Registerable, Updateable {
                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');
@@ -111,20 +142,20 @@ class ShipSimuBaseUser extends BaseUser implements Registerable, Updateable {
                } // 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
@@ -143,7 +174,7 @@ class ShipSimuBaseUser extends BaseUser implements Registerable, Updateable {
                } // END - if
 
                // Does the money bank lend more money?
-               /** UNFINISHED PART!
+               /* UNFINISED:
                if ($bankInstance->ifBankLendsMoreMoney()) {
                        // Okay, that they will do
                        $bankLends = true;
diff --git a/application/ship-simu/main/user/class_ShipSimuGuest.php b/application/ship-simu/main/user/class_ShipSimuGuest.php
deleted file mode 100644 (file)
index e4edbc5..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?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]
-?>
diff --git a/application/ship-simu/main/user/class_ShipSimuMember.php b/application/ship-simu/main/user/class_ShipSimuMember.php
deleted file mode 100644 (file)
index 2f72868..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-<?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]
-?>
index f2caaa8eee31ea0762f622922e2c175bdd92dcea..ed2673aaf899ee06147af17ea3787a044a7a5914 100644 (file)
@@ -161,6 +161,12 @@ class ShipSimuMember extends ShipSimuBaseUser implements ManageableMember {
         * @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
index 63285af742d82989c4238b13d5a14d81fc456efd..272236476488375cdc8e8241a0a2b4d96cf82ace 100644 (file)
@@ -19,7 +19,7 @@ if ($linkInstance->getValueInstance()->ifUserCreatedMaximumAllowedCompanies()) {
        // 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&uuml;ck.");
@@ -31,14 +31,17 @@ if ($linkInstance->getValueInstance()->ifUserCreatedMaximumAllowedCompanies()) {
 }
 
 // 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&uuml;ssig bist!");
+$linkInstance->addLinkGroup('goverment', "Bewerbe dich bei anderen Firmen und hole dir eine Starthilfe vom virtuellen Staat ab wenn du nicht fl&uuml;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&auml;hlen.");
 } elseif ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) {
        // Display link to goverment for startup help
-       $linkInstance->addActionLink('goverment&amp;sub=request&amp;request=startup_help', "Direkt zum Antragsformular f&uuml;r deine Starthilfe.");
+       $linkInstance->addActionLink('goverment_startup_help', "Direkt zum Antragsformular f&uuml;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. :-)");
@@ -49,11 +52,11 @@ $linkInstance->addLinkGroup('moneybank', "Leihe dir zu g&uuml;nstigen Zinsen vir
 
 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&uuml;ck.");
-       $linkInstance->addActionLink('moneybank&amp;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&auml;ter nochmal versuchen.");
diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp
new file mode 100644 (file)
index 0000000..3c15204
--- /dev/null
@@ -0,0 +1,20 @@
+<?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&uuml;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>
index a632dcd2955d534ff5b7efad644408b5309b2c95..0020169c97d4bc0c402d83243802b0cc297c5ebd 100644 (file)
@@ -29,10 +29,7 @@ class GetterNotFoundException extends FrameworkException {
         * @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&uuml;r Attribut <span class=\"exception_reason\">%s</span> nicht gefunden.",
                        $dataArray[0]->__toString(),
index 25cf9389f68b7708182e3767fedece739e04d8ec..96b5c2291eab729c88552c13a6db66c0ce6af999 100644 (file)
@@ -153,13 +153,12 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
        /**
         * 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;
        }
 
        /**
@@ -188,9 +187,8 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
         * @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;
        }
 
@@ -370,6 +368,7 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
                        // 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())) {
@@ -377,7 +376,7 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
                                if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
                                        // Skip this file!
                                        continue;
-                               }
+                               } // END - if
 
                                // Read the file
                                $dataArray = $this->getDataArrayFromFile($pathName . $dataFile);
@@ -402,8 +401,13 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
                                                                } // END - if
                                                        } // END - if
 
+                                                       // Set id number
+                                                       $dataArray['__idx'] = $idx;
+
                                                        // Entry found!
                                                        $resultData['rows'][] = $dataArray;
+
+                                                       // Count found entries up
                                                        $limitFound++;
                                                        break;
                                                } // END - if
@@ -412,6 +416,9 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend
                                        // Throw an exception here
                                        throw new SqlException(array($this, sprintf("File &#39;%s&#39; 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
index 1bbbf0315c7365b83e2233e92c47c2ecb12c7466..0406bb2172e25e57c11372be31696b55852c0713 100644 (file)
@@ -26,6 +26,7 @@ class UserDatabaseWrapper extends BaseDatabaseWrapper {
        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";
index 4e75421e1832f566291a11263478f47440a832b4..0991492f7c10e3f24578ca044d80a74e0c28a8b2 100644 (file)
@@ -101,10 +101,13 @@ class EmailChangeFilter extends BaseFrameworkSystem implements Filterable {
                $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.");
        }
 }
 
index 0a3432de390c06c6729bc4ff4760a5f6009b6071..b3fc24d717409210fba85d3165f371ca220a658b 100644 (file)
@@ -32,6 +32,11 @@ class BaseUser extends BaseFrameworkSystem {
         */
        private $userName = "";
 
+       /**
+        * User id of current user
+        */
+       private $userId = 0;
+
        /**
         * Email of current user
         */
@@ -59,26 +64,46 @@ class BaseUser extends BaseFrameworkSystem {
         * @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;
        }
 
        /**
@@ -108,7 +133,8 @@ class BaseUser extends BaseFrameworkSystem {
                        $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
@@ -147,6 +173,7 @@ class BaseUser extends BaseFrameworkSystem {
 
                        // 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
@@ -194,6 +221,7 @@ class BaseUser extends BaseFrameworkSystem {
 
                // 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
index 3e9cd2b4ba735f0d8e2fef8f25cc11b13028d83f..fd44cdf394265209910fc435a38b5761a82ff015 100644 (file)
@@ -32,63 +32,63 @@ require($cfg->readConfig('base_path') . 'application/ship-simu/loader.php');
 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()
        ));
 }
@@ -105,13 +105,13 @@ if (defined('DEBUG_PERSONELL_OBJ')) {
 $harbor = Harbor::createHarbor("Hamburger Hafen");
 
 // Name ausgeben
-DebugMiddleware::getInstance()->output(sprintf("Der <strong>%s</strong> ist gegr&uuml;ndet worden.<br />\n",
+DebugMiddleware::getInstance()->output(sprintf("Der <span class=\"exception_reason\">%s</span> ist gegr&uuml;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)
@@ -225,7 +225,7 @@ foreach ($einbauten['parts'] as $key=>$part) {
                                        $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));
                                }
                        }
 
@@ -264,7 +264,7 @@ foreach ($einbauten['parts'] as $key=>$part) {
                // Run the constructed command
                eval($eval);
        } catch (ItemNotTradeableException $e) {
-               die(sprintf("[Main:] Die Preisliste des H&auml;ndlers <strong>%s</strong> kann nicht bef&uuml;llt werden. Grund: <strong>%s</strong><br />\n",
+               die(sprintf("[Main:] Die Preisliste des H&auml;ndlers <span class=\"exception_reason\">%s</span> kann nicht bef&uuml;llt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
                        $merchant->getMerchantName(),
                        $e->getMessage()
                ));
@@ -273,7 +273,7 @@ foreach ($einbauten['parts'] as $key=>$part) {
 
 // Haendler-Objekt debuggen
 if (defined('DEBUG_MERCHANT_OBJ')) {
-       DebugMiddleware::getInstance()->output(sprintf("Der H&auml;ndler <strong>%s</strong> sieht wie folgt aus:<br />
+       DebugMiddleware::getInstance()->output(sprintf("Der H&auml;ndler <span class=\"exception_reason\">%s</span> sieht wie folgt aus:<br />
 <pre>%s</pre>\n",
                $merchant->getMerchantName(),
                print_r($merchant, true)
@@ -287,13 +287,13 @@ $shipping = ShippingCompany::createShippingCompany("Hanseatic Travel Company", $
 try {
        $shipping->setCompanyFounder(CompanyEmployee::createCompanyEmployee("Roland", "H&auml;der", "M", 1977, 9, 26, true, 2000));
 } catch (BirthdayInvalidException $e) {
-       die(sprintf("[Main:] Reederei-Gr&uuml;nder konnte nicht gesetzt werden. Grund: <strong>%s</strong><br />\n",
+       die(sprintf("[Main:] Reederei-Gr&uuml;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&uuml;ndet worden.<br />\n",
+DebugMiddleware::getInstance()->output(sprintf("Die Reederei <span class=\"exception_reason\">%s</span> ist von <strong>%s %s</strong> gegr&uuml;ndet worden.<br />\n",
        $shipping->getCompanyName(),
        $shipping->getFounderInstance()->getSurname(),
        $shipping->getFounderInstance()->getFamily()
@@ -303,19 +303,19 @@ DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong>
 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()
 ));
@@ -329,17 +329,17 @@ $shipping->createShipyardInHarbor("Werft 3", $harbor);
 try {
        $shipping->addShipTypeToAllShipyards("PassengerShip");
 } catch (ClassNotFoundException $e) {
-       die(sprintf("[Main:] Die Reederei <strong>%s</strong> kann ihre Werften nicht besch&auml;ftigen. Grund: <strong>%s</strong><br />\n",
+       die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> kann ihre Werften nicht besch&auml;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&auml;ftigen. Grund: <strong>%s</strong><br />\n",
+       die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> kann ihre Werften nicht besch&auml;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&auml;ftigen. Grund: <strong>%s</strong><br />\n",
+       die(sprintf("[Main:] Die Reederei <span class=\"exception_reason\">%s</span> kann ihre Werften nicht besch&auml;ftigen. Grund: <span class=\"exception_reason\">%s</span><br />\n",
                $shipping->getCompanyName(),
                $e->getMessage()
        ));
@@ -349,29 +349,29 @@ try {
 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&auml;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&auml;ftigt nun ihre <strong>%d</strong> Mitarbeiter in <strong>%d</strong> Werft(en):<br />\n",
        $shipping->getCompanyName(),
        $shipping->getTotalEmployee(),
        $shipping->getTotalShipyards()
@@ -382,23 +382,23 @@ DebugMiddleware::getInstance()->output(sprintf("Die Reederei <strong>%s</strong>
 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()
        ));
 }
@@ -410,17 +410,17 @@ $contract = $shipping->getLastContractInstance();
 try {
        $shipping->setMerchantInstance($merchant);
 } catch (NullPointerException $e) {
-       die(sprintf("[Main:] Der H&auml;ndler <strong>%s</strong> konnte nicht ausgew&auml;hlt werden. Grund: <strong>%s</strong><br />\n",
+       die(sprintf("[Main:] Der H&auml;ndler <span class=\"exception_reason\">%s</span> konnte nicht ausgew&auml;hlt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
                $merchant->getMerchantName(),
                $e->getMessage()
        ));
 } catch (NoObjectException $e) {
-       die(sprintf("[Main:] Der H&auml;ndler <strong>%s</strong> konnte nicht ausgew&auml;hlt werden. Grund: <strong>%s</strong><br />\n",
+       die(sprintf("[Main:] Der H&auml;ndler <span class=\"exception_reason\">%s</span> konnte nicht ausgew&auml;hlt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
                $merchant->getMerchantName(),
                $e->getMessage()
        ));
 } catch (ClassMismatchException $e) {
-       die(sprintf("[Main:] Der H&auml;ndler <strong>%s</strong> konnte nicht ausgew&auml;hlt werden. Grund: <strong>%s</strong><br />\n",
+       die(sprintf("[Main:] Der H&auml;ndler <span class=\"exception_reason\">%s</span> konnte nicht ausgew&auml;hlt werden. Grund: <span class=\"exception_reason\">%s</span><br />\n",
                $merchant->getMerchantName(),
                $e->getMessage()
        ));
@@ -430,12 +430,12 @@ try {
 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()
        ));
@@ -443,12 +443,12 @@ try {
 
 // 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()
        ));
@@ -466,12 +466,12 @@ foreach ($einbauten['parts'] as $key=>$part) {
                // 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()
                ));
@@ -480,7 +480,7 @@ foreach ($einbauten['parts'] as $key=>$part) {
 
 // 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)
@@ -499,29 +499,29 @@ unset($typeValid);
 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)
@@ -534,32 +534,32 @@ unset($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()
        ));
@@ -567,12 +567,12 @@ try {
 
 // 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()
        ));
@@ -594,11 +594,11 @@ if (defined('DEBUG_CONTRACT_OBJ')) {
 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()
        ));
 }
index 6d885ab9fe83dfc8d10cd8077b318aa90c4f68ae..1b9dc3a36e17b174078c994372d377e6f074d5ba 100644 (file)
@@ -32,63 +32,63 @@ require($cfg->readConfig('base_path') . 'application/ship-simu/loader.php');
 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()
        ));
 }
@@ -108,15 +108,15 @@ exit();
 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()
        ));
 }
@@ -133,35 +133,35 @@ if (defined('DEBUG_PERSONELL_OBJ')) {
 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()
        ));
 }
index 67dea21ae1423e1a34d7a3b07ca77e9bb92c39d8..3a674207f6bf52871d5b49b1487d1c4002ebc3cb 100644 (file)
@@ -32,63 +32,63 @@ require($cfg->readConfig('base_path') . 'application/ship-simu/loader.php');
 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()
        ));
 }
@@ -108,15 +108,15 @@ exit();
 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()
        ));
 }
@@ -133,35 +133,35 @@ if (defined('DEBUG_PERSONELL_OBJ')) {
 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()
        ));
 }