]> git.mxchange.org Git - shipsimu.git/commitdiff
A lot debug messages removed, mailer with stubs added, resend link basicly finished...
authorRoland Häder <roland@mxchange.org>
Sat, 21 Jun 2008 21:01:42 +0000 (21:01 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 21 Jun 2008 21:01:42 +0000 (21:01 +0000)
59 files changed:
.gitattributes
application/ship-simu/main/class_BasePersonell.php
application/ship-simu/main/class_BaseSimulator.php
application/ship-simu/main/class_Merchant.php
application/ship-simu/main/class_WorksContract.php
application/ship-simu/main/companies/class_ShippingCompany.php
application/ship-simu/main/constructions/harbors/class_Harbor.php
application/ship-simu/main/constructions/yards/class_Shipyard.php
application/ship-simu/main/drives/class_BaseDrive.php
application/ship-simu/main/drives/motor/class_Motor.php
application/ship-simu/main/login/helper/class_ShipSimuLoginHelper.php
application/ship-simu/main/parts/maschineroom/class_MaschineRoom.php
application/ship-simu/main/personell/class_SimulatorPersonell.php
application/ship-simu/main/personell/company/class_CompanyEmployee.php
application/ship-simu/main/ships/class_BaseShip.php
application/ship-simu/main/ships/passenger/class_PassengerShip.php
application/ship-simu/main/structures/extended/cabines/ship/class_EconomyCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_LowCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_LuxuryCabin.php
application/ship-simu/main/structures/extended/cabines/ship/class_PremierCabin.php
application/ship-simu/main/structures/extended/class_BaseCabinStructure.php
application/ship-simu/main/structures/extended/class_BaseDeckStructure.php
application/ship-simu/main/structures/extended/decks/cargo/class_CarDeck.php
application/ship-simu/main/structures/extended/decks/cargo/class_TrainDeck.php
application/ship-simu/main/structures/extended/decks/cargo/class_TruckDeck.php
application/ship-simu/main/structures/extended/upper/class_Bridge.php
inc/classes/exceptions/helper/class_UserInstanceMissingException.php
inc/classes/interfaces/mailer/.htaccess [new file with mode: 0644]
inc/classes/interfaces/mailer/class_DeliverableMail.php [new file with mode: 0644]
inc/classes/interfaces/user/class_ManageableAccount.php [new file with mode: 0644]
inc/classes/interfaces/user/class_ManageableUser.php [deleted file]
inc/classes/interfaces/user/extended/.htaccess [new file with mode: 0644]
inc/classes/interfaces/user/extended/class_ManageableGuest.php [new file with mode: 0644]
inc/classes/interfaces/user/extended/class_ManageableUser.php [new file with mode: 0644]
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/commands/class_
inc/classes/main/commands/web/class_WebDoFormCommand.php
inc/classes/main/commands/web/class_WebHomeCommand.php
inc/classes/main/commands/web/class_WebLoginAreaCommand.php
inc/classes/main/commands/web/class_WebLoginCommand.php
inc/classes/main/commands/web/class_WebLoginFailedCommand.php
inc/classes/main/commands/web/class_WebLogoutDoneCommand.php
inc/classes/main/commands/web/class_WebRegisterCommand.php
inc/classes/main/commands/web/class_WebResendLinkCommand.php
inc/classes/main/console/class_ConsoleTools.php
inc/classes/main/debug/class_DebugWebOutput.php
inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php
inc/classes/main/mailer/.htaccess [new file with mode: 0644]
inc/classes/main/mailer/class_ [new file with mode: 0644]
inc/classes/main/mailer/class_BaseMailer.php [new file with mode: 0644]
inc/classes/main/mailer/debug/.htaccess [new file with mode: 0644]
inc/classes/main/mailer/debug/class_DebugMailer.php [new file with mode: 0644]
inc/classes/main/user/class_Guest.php
inc/config.php
inc/database/lib-local.php
tests/ConfigTest.php
tests/RegistryTest.php
tests/RequestTest.php
tests/Test.php

index 27e7b4a782c54d2ec057f8ac5b4ea41383b736b1..906be9eed4ee25121cf35b33af9d7cea0bf8c81d 100644 (file)
@@ -305,6 +305,8 @@ inc/classes/interfaces/language/.htaccess -text
 inc/classes/interfaces/language/class_ManageableLanguage.php -text
 inc/classes/interfaces/login/.htaccess -text
 inc/classes/interfaces/login/class_LoginableUser.php -text
+inc/classes/interfaces/mailer/.htaccess -text
+inc/classes/interfaces/mailer/class_DeliverableMail.php -text
 inc/classes/interfaces/reader/.htaccess -text
 inc/classes/interfaces/reader/class_ReadableNews.php -text
 inc/classes/interfaces/registration/.htaccess -text
@@ -333,7 +335,10 @@ inc/classes/interfaces/template/.htaccess -text
 inc/classes/interfaces/template/class_CompileableTemplate.php -text
 inc/classes/interfaces/template/view/class_ViewHelper.php -text
 inc/classes/interfaces/user/.htaccess -text
-inc/classes/interfaces/user/class_ManageableUser.php -text
+inc/classes/interfaces/user/class_ManageableAccount.php -text
+inc/classes/interfaces/user/extended/.htaccess -text
+inc/classes/interfaces/user/extended/class_ManageableGuest.php -text
+inc/classes/interfaces/user/extended/class_ManageableUser.php -text
 inc/classes/main/.htaccess -text
 inc/classes/main/actions/.htaccess -text
 inc/classes/main/actions/class_ -text
@@ -457,6 +462,11 @@ inc/classes/main/io/class_FrameworkFileInputPointer.php -text
 inc/classes/main/io/class_FrameworkFileOutputPointer.php -text
 inc/classes/main/language/.htaccess -text
 inc/classes/main/language/class_LanguageSystem.php -text
+inc/classes/main/mailer/.htaccess -text
+inc/classes/main/mailer/class_ -text
+inc/classes/main/mailer/class_BaseMailer.php -text
+inc/classes/main/mailer/debug/.htaccess -text
+inc/classes/main/mailer/debug/class_DebugMailer.php -text
 inc/classes/main/output/.htaccess -text
 inc/classes/main/output/class_ConsoleOutput.php -text
 inc/classes/main/output/class_WebOutput.php -text
index 65df945617962479b9323f096ff9c1253f228216..368fbfafb872719d35cfc71af48b193b7bb5d418 100644 (file)
@@ -58,10 +58,6 @@ class BasePersonell extends BaseFrameworkSystem implements Personellizer {
 
        // Remove min/max ages
        public final function removeMinMaxAge () {
-               if (defined('DEBUG_PERSONELL')) $this->getDebugInstance()->output(sprintf("[%s:%d] Minimum-/Maximum-Alter entfernt.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                unset($this->MIN_AGE);
                unset($this->MAX_AGE);
        }
index ffdbc66179afa49418ac7b38e2f5294550d7495f..3f7daa1ae0ed026b8b6fe5bfc3767a38d000a15d 100644 (file)
@@ -57,52 +57,31 @@ class BaseSimulator extends BaseFrameworkSystem {
 
        // Setter-Methode fuer Laenge
        public final function setLength ($length) {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] <strong>%dm</strong> L&auml;nge gesetzt.<br />\n",
-                       $this->__toString(),
-                       $length
-               ));
                $this->length = (float) $length;
        }
 
        // Setter-Methode fuer Breite
        public final function setWidth ($width) {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] <strong>%dm</strong> Breite gesetzt.<br />\n",
-                       $this->__toString(),
-                       $width
-               ));
                $this->width = (float) $width;
        }
 
        // Setter-Methode fuer Hoehe
        public final function setHeight ($height) {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] <strong>%dm</strong> H&ouml;he gesetzt.<br />\n",
-                       $this->__toString(),
-                       $height
-               ));
                $this->height = (float) $height;
        }
 
        // Getter-Methode fuer Laenge
        public final function getLength () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] L&auml;nge angefordert.<br />\n",
-                       $this->__toString()
-               ));
                return $this->length;
        }
 
        // Getter-Methode fuer Breite
        public final function getWidth () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] L&auml;nge angefordert.<br />\n",
-                       $this->__toString()
-               ));
                return $this->width;
        }
 
        // Getter-Methode fuer Hoehe
        public final function getHeight () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] H&ouml;he angefordert.<br />\n",
-                       $this->__toString()
-               ));
                return $this->height;
        }
 
@@ -121,18 +100,7 @@ class BaseSimulator extends BaseFrameworkSystem {
 
        // Remover-Methode fuer die Teil-Instanz
        public final function removePartInstance () {
-               if ($this->getPartInstance() !== null) {
-                       // Warnung ausgeben
-                       if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] partInstance ist nicht null! Instanz-Attribut wird nicht entfernt.<br />\n",
-                               $this->__toString()
-                       ));
-               } else {
-                       // Leere Instanz kann entfernt werden
-                       if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] partInstance wurde entfernt.<br />\n",
-                               $this->__toString()
-                       ));
-                       unset($this->partInstance);
-               }
+               unset($this->partInstance);
        }
 
        // Prueft ob all Umberechnungsfaktoren gesetzt sind
@@ -149,7 +117,7 @@ class BaseSimulator extends BaseFrameworkSystem {
                $this->currShip = $shipInstance;
                $this->currPart = $partInstance;
 
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Maschinenraum mit Motor <strong>%s</strong> wird fuer das Schiff <strong>%s</strong> konstruiert.<br />\n",
+               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Maschinenraum mit Motor <strong>%s</strong> wird fuer das Schiff <strong>%s</strong> konstruiert.",
                        $this->__toString(),
                        $this->getCurrPart()->getObjectDescription(),
                        $this->currShip->getShipName()
@@ -158,7 +126,7 @@ class BaseSimulator extends BaseFrameworkSystem {
                // Passt ueberhaupt das Schiffsteil in's Schiff?
                if ($this->isShipPartSizeValid()) {
                        // Berechnungen fuer umliegendes Objekt anpassen
-                       if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Das Schiffsteil <strong>%s</strong> vom Typ <strong>%s</strong> passt in das Schiff <strong>%s</strong> hinein.<br />\n",
+                       if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Das Schiffsteil <strong>%s</strong> vom Typ <strong>%s</strong> passt in das Schiff <strong>%s</strong> hinein.",
                                $this->__toString(),
                                $this->getCurrPart()->getObjectDescription(),
                                $this->getCurrPart()->__toString(),
@@ -175,7 +143,7 @@ class BaseSimulator extends BaseFrameworkSystem {
                                // Passt dies nun immer noch?
                                if ($this->isNewSizeValid()) {
                                        // Das passt auch, dann Werte setzen und Motor-Instanz merken
-                                       if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Das Schiffsteil <strong>%s</strong> passt in das Schiff <strong>%s</strong> hinein.<br />\n",
+                                       if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Das Schiffsteil <strong>%s</strong> passt in das Schiff <strong>%s</strong> hinein.",
                                                $this->__toString(),
                                                $this->getObjectDescription(),
                                                $this->currShip->getShipName()
@@ -204,7 +172,7 @@ class BaseSimulator extends BaseFrameworkSystem {
                        // Existiert ein Schiffsteil?
                        if (!is_null($this->currPart)) {
                                // Debug-Meldung ausgeben
-                               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Schiffsteil <strong>%s</strong> gefunden.<br />\n",
+                               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Schiffsteil <strong>%s</strong> gefunden.",
                                        $this->getCurrPart()->realClass,
                                        $this->getCurrPart()->getObjectDescription()
                                ));
@@ -235,9 +203,6 @@ class BaseSimulator extends BaseFrameworkSystem {
 
        // Array fuer Umrechnungstabelle entfernen
        public final function removeResizeFactorArray () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] removeResizeFactor erreicht.<br />\n",
-                       $this->__toString()
-               ));
                unset($this->resizeFactorArray);
        }
 
@@ -258,82 +223,52 @@ class BaseSimulator extends BaseFrameworkSystem {
         * @return      void
         */
        public final function removeCurrShip () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] removeCurrShip erreicht.<br />\n",
-                       $this->__toString()
-               ));
                unset($this->currShip);
        }
 
        // Aktuelle Schiffsteil-Instanz entfernen
        public final function removeCurrPart () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] removeCurrPart erreicht.<br />\n",
-                       $this->__toString()
-               ));
                unset($this->currPart);
        }
 
        // Breite entfernen
        public final function removeWidth () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Breite entfernt.<br />\n",
-                       $this->__toString()
-               ));
                unset($this->width);
        }
 
        // Hoehe entfernen
        public final function removeHeight () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] H&ouml;he entfernt.<br />\n",
-                       $this->__toString()
-               ));
                unset($this->height);
        }
 
        // Laenge entfernen
        public final function removeLength () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] L&auml;nge entfernt.<br />\n",
-                       $this->__toString()
-               ));
                unset($this->length);
        }
 
        // Tiefgang entfernen
        public final function removeDraught () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Tiefgang entfernt.<br />\n",
-                       $this->__toString()
-               ));
                unset($this->draught);
        }
 
        // Getter-Methode fuer Element aus resizeFactor
        public final function getResizeFactorElement ($el) {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] getResizeFactorElement erreicht. (element=%s)<br />\n",
-                       $this->__toString(),
-                       $el
-               ));
                if (isset($this->resizeFactorArray[$el])) {
                        // Element gefunden
                        return $this->resizeFactorArray[$el];
                } else {
                        // Element nicht gefunden!
-                       return 0;
+                       return null;
                }
        }
 
        // Setter-Methode fuer Element in resizeFactor
        public final function setResizeFactorElement ($el, $value) {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Umberechnungsfaktor <strong>%s</strong>=<strong>%s</strong> gesetzt.<br />\n",
-                       $this->__toString(),
-                       $el,
-                       $value
-               ));
                $this->resizeFactorArray[$el] = (float) $value;
        }
 
        // Kontrolliert, ob die Abmasse Schiffsteil->Schiff stimmen
        public function isShipPartSizeValid () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] isShipPartSizeValid erreicht.<br />\n",
-                       $this->__toString()
-               ));
                return (
                        (
                                ( // Already defined ship messurings
@@ -354,9 +289,6 @@ class BaseSimulator extends BaseFrameworkSystem {
 
        // Kontrolliert, ob die Abmasse Maschinenraum->Schiff stimmen
        public function isNewSizeValid () {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] isNewSizeValid erreicht.<br />\n",
-                       $this->__toString()
-               ));
                return (
                        ( // Already defined ship messurings
                                         ($this->newWidth  < $this->currShip->getWidth())
@@ -372,11 +304,6 @@ class BaseSimulator extends BaseFrameworkSystem {
 
        // Masse extrahieren
        public function extractDimensions ($dim) {
-               if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] extractDimensions erreicht f&uuml;r <strong>%s</strong>.<br />\n",
-                       $this->__toString(),
-                       $this->getObjectDescription()
-               ));
-
                // Abmasse setzen
                if ((isset($dim)) && (is_array($dim)) && (count($dim) == 3)) {
                        // Abmasse aus Array holen
index e993c2d53038db001af31a46cc90fccf009c7f55..fc3d86076c841fbb465eea98a630602ec029d977 100644 (file)
@@ -56,7 +56,7 @@ class Merchant extends BaseFrameworkSystem {
 
                // Debug message
                if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) {
-                       $merchantInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein H&auml;ndler <strong>%s</strong> wird angelegt und soll sich am <strong>%s</strong> niederlassen.<br />\n",
+                       $merchantInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein H&auml;ndler <strong>%s</strong> wird angelegt und soll sich am <strong>%s</strong> niederlassen.",
                                __CLASS__,
                                __LINE__,
                                $merchantName,
@@ -79,57 +79,27 @@ class Merchant extends BaseFrameworkSystem {
 
        // Initialize pricing list
        private function createPriceList () {
-               if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndler <strong>%s</strong> erh&auml;lt eine leere Preisliste.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->getMerchantName()
-               ));
                $this->priceList = new FrameworkArrayObject("FakedPriceList");
        }
 
        // Setter for merchant name
        public final function setMerchantName ($merchantName) {
-               // Secure string
-               $merchantName = (string) $merchantName;
-
                // Debug message
-               if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndlername <strong>%s</strong> ist nun bekannt.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $merchantName
-               ));
-               $this->merchantName = $merchantName;
+               $this->merchantName = (string) $merchantName;
        }
 
        // Getter for merchant name
        public final function getMerchantName () {
-               if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndlername <strong>%s</strong> wird verlangt.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->merchantName
-               ));
                return $this->merchantName;
        }
 
        // Setter for harbor instance
        public final function setHarborInstance (Harbor $harborInstance) {
-               if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndler <strong>%s</strong> l&auml;sst sich am <strong>%s</strong> nieder.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->getMerchantName(),
-                       $harborInstance->getHarborName()
-               ));
                $this->harborInstance = $harborInstance;
        }
 
        // Getter for harbor instance
        public final function getHarborInstance () {
-               if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndler <strong>%s</strong> hat sich am <strong>%s</strong> niedergelassen.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->getMerchantName(),
-                       $harborInstance->getHarborName()
-               ));
                return $this->harborInstance;
        }
 
@@ -139,7 +109,7 @@ class Merchant extends BaseFrameworkSystem {
                $price = (float) $price;
 
                // Debug message
-               if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndler <strong>%s</strong> kann nun das Schiffsteil <strong>%s</strong> &quot;<strong>%s</strong>&quot; zu <strong>%s</strong> verkaufen.<br />\n",
+               if ((defined('DEBUG_MERCHANT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der H&auml;ndler <strong>%s</strong> kann nun das Schiffsteil <strong>%s</strong> &quot;<strong>%s</strong>&quot; zu <strong>%s</strong> verkaufen.",
                        __CLASS__,
                        __LINE__,
                        $this->getMerchantName(),
index 80ae2eacc3a765c9f60431dd5f1f113bdda9ceda..b776759bf41d3af5dac2cbfcafc163a3bd7e8778 100644 (file)
@@ -65,7 +65,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                $contractInstance = new WorksContract();
 
                // Debug-Meldung ausgeben
-               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $contractInstance->getDebugInstance()->output(sprintf("[%s:%d] Neuer Bauvertrag wird f&uuml;r das Schiff <strong>%s</strong> mit der <strong>%s</strong> <strong>%s</strong> erstellt.<br />\n",
+               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $contractInstance->getDebugInstance()->output(sprintf("[%s:%d] Neuer Bauvertrag wird f&uuml;r das Schiff <strong>%s</strong> mit der <strong>%s</strong> <strong>%s</strong> erstellt.",
                        __CLASS__,
                        __LINE__,
                        $shipName,
@@ -98,40 +98,21 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
 
        // Setter for ship instance
        private final function setShipInstance (ConstructableShip $shipInstance) {
-               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> wird in den Bauvertrag aufgenommen.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $shipInstance->getShipName()
-               ));
                $this->shipInstance = $shipInstance;
        }
 
        // Setter for ship name
        private final function setShipName ($shipName) {
-               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das neue Schiff wird <strong>%s</strong> heissen.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $shipName
-               ));
                $this->shipName = (string) $shipName;
        }
 
        // Getter for ship name
        public final function getShipName () {
-               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Schiffsname <strong>%s</strong> angefordert.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->shipName
-               ));
                return $this->shipName;
        }
 
        // Getter for ship instance
        public final function getShipInstance () {
-               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Schiff-Instanz angefordert.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                return $this->shipInstance;
        }
 
@@ -142,7 +123,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                $parentPart = (string) $parentPart;
 
                // Debug message
-               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiffsteil <strong>%s</strong> wird zusammen mit dem Konstruktionsteil <strong>%s</strong> in den Bauvertrag aufgenommen.<br />\n",
+               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiffsteil <strong>%s</strong> wird zusammen mit dem Konstruktionsteil <strong>%s</strong> in den Bauvertrag aufgenommen.",
                        __CLASS__,
                        __LINE__,
                        $shipPart,
@@ -162,7 +143,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                        ));
 
                        // Debug message
-                       if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Versuche ein Schiffsteil in den Bauvertrag aufzunehmen.<br />\n",
+                       if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Versuche ein Schiffsteil in den Bauvertrag aufzunehmen.",
                                __CLASS__,
                                __LINE__
                        ));
@@ -186,7 +167,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                $price = $this->getMerchantInstance()->getPriceFromList($partInstance);
 
                // Final debug message
-               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s</strong> kostet <strong>%s</strong>.<br />\n",
+               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s</strong> kostet <strong>%s</strong>.",
                        __CLASS__,
                        __LINE__,
                        $partInstance->getObjectDescription(),
@@ -197,7 +178,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                $partInstance->setPrice($price);
 
                // Final debug message
-               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s</strong> wurde in den Bauvertrag aufgenommen.<br />\n",
+               if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s</strong> wurde in den Bauvertrag aufgenommen.",
                        __CLASS__,
                        __LINE__,
                        $partInstance->getObjectDescription()
@@ -258,7 +239,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) {
                        if ($partnerInstance->equals($partyInstance)) {
                                // With itself
-                               $this->getDebugInstance()->output(sprintf("[%s:%d] Die <strong>%s</strong> <em><strong>%s</strong></em> stimmt einem Bauvertrag &uuml;ber das <strong>%s</strong> <em><strong>%s</strong></em> zu.<br />\n",
+                               $this->getDebugInstance()->output(sprintf("[%s:%d] Die <strong>%s</strong> <em><strong>%s</strong></em> stimmt einem Bauvertrag &uuml;ber das <strong>%s</strong> <em><strong>%s</strong></em> zu.",
                                        __CLASS__,
                                        __LINE__,
                                        $partnerInstance->getObjectDescription(),
@@ -268,7 +249,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                                ));
                        } else {
                                // Other contract party
-                               $this->getDebugInstance()->output(sprintf("[%s:%d] Die <strong>%s</strong> <em><strong>%s</strong></em> geht mit der <strong>%s</strong> <em><strong>%s</strong></em> einen Bauvertrag &uuml;ber das <strong>%s</strong> <em><strong>%s</strong></em> ein.<br />\n",
+                               $this->getDebugInstance()->output(sprintf("[%s:%d] Die <strong>%s</strong> <em><strong>%s</strong></em> geht mit der <strong>%s</strong> <em><strong>%s</strong></em> einen Bauvertrag &uuml;ber das <strong>%s</strong> <em><strong>%s</strong></em> ein.",
                                        __CLASS__,
                                        __LINE__,
                                        $partnerInstance->getObjectDescription(),
index 895a19a9ec7a11d8fc1601699ad3bcd5160ff88f..322a61a2a1e0065d72b40bf0d8ad42afb7a8b8d8 100644 (file)
@@ -86,7 +86,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                // Get new instance
                $companyInstance = new ShippingCompany();
 
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $companyInstance->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> wird gegr&uuml;ndet.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $companyInstance->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> wird gegr&uuml;ndet.",
                        __CLASS__,
                        __LINE__,
                        $companyName
@@ -123,7 +123,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Angestellten-Liste erstellen
        private function createEmployeeList () {
-               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erh&auml;lt eine Angestelltenliste.<br />\n",
+               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erh&auml;lt eine Angestelltenliste.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName()
@@ -133,7 +133,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Werftenliste erstellen
        public function createShipyardList () {
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erh&auml;lt eine Werftsliste.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erh&auml;lt eine Werftsliste.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName()
@@ -143,7 +143,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Auftragsliste erstellen
        public function createContractList () {
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erh&auml;lt eine Auftragsliste.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erh&auml;lt eine Auftragsliste.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName()
@@ -177,7 +177,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Reedereien Werften bauen lassen
        public function createShipyardInHarbor($shipyardName, Harbor $harborInstance) {
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> baut im <strong>%s</strong> eine Werft <strong>%s</strong>.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> baut im <strong>%s</strong> eine Werft <strong>%s</strong>.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -198,13 +198,6 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Setter fuer Reederei-Gruender
        public final function setCompanyFounder(CompanyEmployee $founderInstance) {
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> ist von <strong>%s %s</strong> gegr&uuml;ndet worden.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->getCompanyName(),
-                       $founderInstance->getSurname(),
-                       $founderInstance->getFamily()
-               ));
                $this->founderInstance = $founderInstance;
        }
 
@@ -215,26 +208,11 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Neue(n) Angestellte(n) in Angestellten-Liste aufnehmen
        public function addNewEmployee (SimulatorPersonell $employeeInstance) {
-               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s %s</strong> tritt der Reederei <strong>%s</strong> als <strong>%s</strong> bei und erh&auml;lt ein Gehalt von <strong>%s</strong>.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $employeeInstance->getSurname(),
-                       $employeeInstance->getFamily(),
-                       $this->getCompanyName(),
-                       $employeeInstance->getObjectDescription(),
-                       $this->formatCurrency($employeeInstance->getSalary())
-               ));
                $this->employeeList->append($employeeInstance);
        }
 
        // Neue Werft in Liste aufnehmen
        public function addNewShipyard (Shipyard $shipyardInstance) {
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erh&auml;lt die Werft <strong>%s</strong> hinzugef&uuml;gt.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->getCompanyName(),
-                       $shipyardInstance->getShipyardName()
-               ));
                $this->shipyardList->append($shipyardInstance);
        }
 
@@ -244,7 +222,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                $amount = (int) $amount;
 
                // Debug-Meldung ausgeben
-               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> stellt per Zufall <strong>%d</strong> neue Mitarbeiter ein.<br />\n",
+               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> stellt per Zufall <strong>%d</strong> neue Mitarbeiter ein.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -258,7 +236,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                if ($totalUnemployed < $amount) {
                        // Reichte nicht aus!
                        throw new ToMuchEmployeesException(array($amount, $personellInstance->getAllUnemployed()), self::EXCEPTION_NOT_ENOUGTH_UNEMPLOYEES);
-               }
+               } // END - if
 
                // Get list for all unemployed people
                $list = $personellInstance->getSpecialPersonellList(false); // Should be cached
@@ -298,7 +276,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        $employee->increaseSalary((mt_rand(7, 14) * 100)); // Are 700 to 1400 EUR for the begin okay?
 
                        // Debug message
-                       if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> stellt den/die Angestellte(n) <strong>%s %s</strong> ein.<br />\n",
+                       if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> stellt den/die Angestellte(n) <strong>%s %s</strong> ein.",
                                __CLASS__,
                                __LINE__,
                                $this->getCompanyName(),
@@ -314,7 +292,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                $personellInstance->resetCache();
 
                // Debug-Meldung ausgeben
-               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat per Zufall <strong>%d</strong> neue Mitarbeiter eingestellt.<br />\n",
+               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat per Zufall <strong>%d</strong> neue Mitarbeiter eingestellt.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -324,7 +302,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Distribute all personells on all shipyards
        public function distributeAllPersonellOnShipyards () {
-               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> verteilt alle ihre <strong>%d</strong> Mitarbeiter auf alle <strong>%d</strong> Werft(en).<br />\n",
+               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> verteilt alle ihre <strong>%d</strong> Mitarbeiter auf alle <strong>%d</strong> Werft(en).",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -378,7 +356,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                $total = $this->employeeList->count();
 
                // Debug message
-               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat <strong>%d</strong> Mitarbeiter.<br />\n",
+               if ((defined('DEBUG_COMPANY_EMPLOYEE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat <strong>%d</strong> Mitarbeiter.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -391,7 +369,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Getter for total shipyards
        public final function getTotalShipyards () {
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] F&uuml;r die Reederei <strong>%s</strong> werden die Anzahl der Werften in allen H&auml;fen ermittelt.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] F&uuml;r die Reederei <strong>%s</strong> werden die Anzahl der Werften in allen H&auml;fen ermittelt.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName()
@@ -407,7 +385,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                $total = $this->shipyardList->count();
 
                // Debug message
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat <strong>%d</strong> Werft(en).<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat <strong>%d</strong> Werft(en).",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -436,7 +414,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                ));
 
                // Debug message
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> baut in allen Werften bald Schiffe vom Typ <strong>%s</strong>.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> baut in allen Werften bald Schiffe vom Typ <strong>%s</strong>.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -467,7 +445,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // Validate the requested ship type with the company if they can construct it
        public function validateWorksContractShipType (SignableContract $contractInstance) {
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> pr&uuml;ft den Bauauftrag der <strong>%s</strong>.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> pr&uuml;ft den Bauauftrag der <strong>%s</strong>.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -490,7 +468,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                $shipType = $shipInstance->__toString();
 
                // Debug message
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> pr&uuml;ft, ob die <strong>%s</strong> (Typ:<strong>%s</strong>) gebaut werden kann.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> pr&uuml;ft, ob die <strong>%s</strong> (Typ:<strong>%s</strong>) gebaut werden kann.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -508,7 +486,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                $shipType = (string) $shipType;
 
                // Debug message
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> fragt alle Werften ab, ob diese Schiffe vom Typ <strong>%s</strong> bauen k&ouml;nnen.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> fragt alle Werften ab, ob diese Schiffe vom Typ <strong>%s</strong> bauen k&ouml;nnen.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -543,7 +521,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                }
 
                // Debug message
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat die Suche nach einer Werft beendet, die Schiffe vom Typ <strong>%s</strong> bauen kann.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> hat die Suche nach einer Werft beendet, die Schiffe vom Typ <strong>%s</strong> bauen kann.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -556,7 +534,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
        // As a customer the shipping company can add new contracts
        public function addNewWorksContract (SignableContract $contractInstance) {
-               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erstellt einen Bauauftrag f&uuml;r ein <strong>%s</strong> mit dem Namen <strong>%s</strong>.<br />\n",
+               if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erstellt einen Bauauftrag f&uuml;r ein <strong>%s</strong> mit dem Namen <strong>%s</strong>.",
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
@@ -594,7 +572,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                // Determine if company "signs" own contract (must be done) or with an other party
                if ($this->equals($partnerInstance)) {
                        // With itself
-                       if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erteilt an sich selbst einen Bauauftrag f&uuml;r das <strong>%s</strong> &quot;<strong>%s</strong>&quot;.<br />\n",
+                       if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> erteilt an sich selbst einen Bauauftrag f&uuml;r das <strong>%s</strong> &quot;<strong>%s</strong>&quot;.",
                                __CLASS__,
                                __LINE__,
                                $this->getCompanyName(),
@@ -603,7 +581,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        ));
                } else {
                        // Other external company
-                       if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> unterzeichnet einen Bauauftrag f&uuml;r das <strong>%s</strong> &quot;<strong>%s</strong>&quot; mit der <strong>%s</strong>.<br />\n",
+                       if ((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Reederei <strong>%s</strong> unterzeichnet einen Bauauftrag f&uuml;r das <strong>%s</strong> &quot;<strong>%s</strong>&quot; mit der <strong>%s</strong>.",
                                __CLASS__,
                                __LINE__,
                                $this->getCompanyName(),
index 90c5f9b27a97511efaa86e7370be2e1b5389c0d1..31781661b0ad5cc779a5e90571a4b00d99b2198d 100644 (file)
@@ -56,7 +56,7 @@ class Harbor extends BaseConstruction {
                $harborInstance = new Harbor();
 
                // Debug message
-               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen <strong>%s</strong> wird konstruiert.<br />\n", $harborName));
+               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen <strong>%s</strong> wird konstruiert.", $harborName));
 
                // Hafenname setzen
                $harborInstance->setHarborName($harborName);
@@ -65,7 +65,7 @@ class Harbor extends BaseConstruction {
                $harborInstance->createshipyardList();
 
                // Debug-Meldung ausgeben
-               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen <strong>%s</strong> ist jetzt fertig gebaut.<br />\n", $harborName));
+               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $harborInstance->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen <strong>%s</strong> ist jetzt fertig gebaut.", $harborName));
 
                // Instanz zurueckliefern
                return $harborInstance;
@@ -73,40 +73,27 @@ class Harbor extends BaseConstruction {
 
        // Werft-Liste generieren
        public function createshipyardList () {
-               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Werft-Liste wird f&uuml;r den Hafen <strong>%s</strong> erstellt.<br />\n",
-                       $this->getHarborName()
-               ));
                $this->shipyardList = new FrameworkArrayObject("FakedShipyardList");
        }
 
        // Setter fuer Hafennamen
        public final function setHarborName ($harborName) {
-               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Der Hafen heisst jetzt <strong>%s</strong>.<br />\n", $harborName));
                $this->harborName = (string) $harborName;
        }
 
        // Getter fuer Hafennamen
        public final function getHarborName () {
-               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Hafenname <strong>%s</strong> wurde angefordert.<br />\n", $this->harborName));
                return $this->harborName;
        }
 
        // Werft in den Hafen einbauen und Werft->Reederei zuweisen
        public function addNewShipyardNotify ($shipyardName, ShippingCompany $companyInstance) {
-               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Die Werft <strong>%s</strong> wird im Hafen <strong>%s</strong> gebaut.<br />\n",
-                       $shipyardName, $this->getHarborName()
-               ));
-
                // Werft generieren und in die Werftliste aufnehmen
                $this->shipyardList->append(Shipyard::createShipyardNotify($this, $shipyardName, $companyInstance));
        }
 
        // Werft in den Hafen einbauen ohne Zuweisung einer Reederei (gehoert der "Stadt" dann)
        public function addNewShipyard ($shipyardName) {
-               if ((defined('DEBUG_HARBOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[Harbor:] Die Werft <strong>%s</strong> wird im Hafen <strong>%s</strong> gebaut.<br />\n",
-                       $shipyardName, $this->getHarborName()
-               ));
-
                // Werft generieren und in die Werftliste aufnehmen
                $this->shipyardList->append(Shipyard::createShipyard($this, $shipyardName));
        }
index d3a015c51447c2226c464dfce977cc0efbf12048..666fe4691102e0ea5d4dbc1260a6936f29f4c0cd 100644 (file)
@@ -27,10 +27,10 @@ class Shipyard extends BaseConstruction {
        private $shipyardName    = "Namenlose Werft";
 
        // Arbeiter-Liste
-       private $staffList       = null;
+       private $staffList = null;
 
        // Queue-Liste fuer zu bauende Schiffe
-       private $queueList       = null;
+       private $queueList = null;
 
        // Aktuell im Bau befindliches Schiff
        private $currShipInConst = null;
@@ -81,7 +81,7 @@ class Shipyard extends BaseConstruction {
                $shipyardInstance = new Shipyard();
 
                // Debug message
-               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $shipyardInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Werft mit dem Namen <strong>%s</strong> wird im Hafen <strong>%s</strong> konstruiert.<br />\n",
+               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $shipyardInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Werft mit dem Namen <strong>%s</strong> wird im Hafen <strong>%s</strong> konstruiert.",
                        __CLASS__,
                        __LINE__,
                        $shipyardName,
@@ -104,7 +104,7 @@ class Shipyard extends BaseConstruction {
                $shipyardInstance->removeSystemArray();
 
                // Debug-Meldung
-               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $shipyardInstance->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> wurde gebaut.<br />\n",
+               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $shipyardInstance->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> wurde gebaut.",
                        __CLASS__,
                        __LINE__,
                        $shipyardName
@@ -116,21 +116,11 @@ class Shipyard extends BaseConstruction {
 
        // Create staff list
        private function createStaffList () {
-               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> erh&auml;lt eine Arbeiterliste.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->getShipyardName()
-               ));
                $this->staffList = new FrameworkArrayObject("FakedStaffList");
        }
 
        // Create ship type list
        private function createShipTypeList () {
-               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> erh&auml;lt eine Typenliste.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->getShipyardName()
-               ));
                $this->shipTypeList = new FrameworkArrayObject("FakedShipTypeList");
        }
 
@@ -176,7 +166,7 @@ class Shipyard extends BaseConstruction {
                $shipType = (string) $shipType;
 
                // Debug message
-               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> kann bald Schiffe vom Typ <strong>%s</strong> bauen.<br />\n",
+               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> kann bald Schiffe vom Typ <strong>%s</strong> bauen.",
                        __CLASS__,
                        __LINE__,
                        $this->getShipyardName(),
@@ -196,7 +186,7 @@ class Shipyard extends BaseConstruction {
                $shipType = (string) $shipType;
 
                // Debug message
-               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> pr&uuml;ft, ob Schiffe vom Typ <strong>%s</strong> baubar sind.<br />\n",
+               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> pr&uuml;ft, ob Schiffe vom Typ <strong>%s</strong> baubar sind.",
                        __CLASS__,
                        __LINE__,
                        $this->getShipyardName(),
@@ -216,7 +206,7 @@ class Shipyard extends BaseConstruction {
                }
 
                // Debug message
-               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> hat die Suche nach dem Schiffstyp <strong>%s</strong> abgeschlossen.<br />\n",
+               if ((defined('DEBUG_SHIPYARD')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Werft <strong>%s</strong> hat die Suche nach dem Schiffstyp <strong>%s</strong> abgeschlossen.",
                        __CLASS__,
                        __LINE__,
                        $this->getShipyardName(),
index 4891d7354c735101b63cbbfb846b6434ba374e5d..a1779985c58c0329ab457b6d24f13aa95108ce39 100644 (file)
@@ -44,21 +44,11 @@ class BaseDrive extends BaseSimulator {
 
        // Setter-Methode fuert PS-Zahl
        public final function setHorsePower ($hp) {
-               if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Antriebsleistung wird auf <strong>%d</strong> PS gesetzt.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $hp
-               ));
                $this->horsePower = (int) $hp;
        }
 
        // Setter-Methode fuer Nockenanzahl
        public final function setNumCams ($cams) {
-               if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Nockenanzahl wird auf <strong>%d</strong> Nocken gesetzt.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $cams
-               ));
                $this->numCams = (int) $cams;
        }
 
index 48573fa62fc8d8299893c372210bc18e014c194e..a0778b0954d46902ca7270f4bf4f755d4d4aef2e 100644 (file)
@@ -43,7 +43,7 @@ class Motor extends BaseDrive implements TradeableItem, ConstructableShipPart {
                $motorInstance = new Motor();
 
                // Debug message
-               if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $motorInstance->getDebugInstance()->output(sprintf("[%s:%d] Motor <strong>%s</strong> wird gebaut...<br />\n",
+               if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $motorInstance->getDebugInstance()->output(sprintf("[%s:%d] Motor <strong>%s</strong> wird gebaut...",
                        __CLASS__,
                        __LINE__,
                        $descr
index 0e9aee1fedb768cc73a6d420f951875a2ca4e2c5..04b45c74a01076093915a17ceedcc8ac9a7c49d6 100644 (file)
@@ -70,7 +70,7 @@ class ShipSimuLoginHelper extends BaseLoginHelper implements HelpableLogin {
                $userInstance = Registry::getRegistry()->getInstance('user');
 
                // Is this instance valid?
-               if (!$userInstance instanceof ManageableUser) {
+               if (!$userInstance instanceof ManageableAccount) {
                        // Thrown an exception here
                        throw new UserInstanceMissingException (array($helperInstance, 'user'), self::EXCEPTION_INVALID_USER_INSTANCE);
                } // END - if
index 2828280a07b27a34346b16298cb29b384a32e7f5..16657b031a7fc330ccff44400aef3c1a74dfda11 100644 (file)
@@ -43,7 +43,7 @@ class MaschineRoom extends BaseShipPart {
                $roomInstance = new MaschineRoom();
 
                // Debug message
-               if ((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) $roomInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein Maschinenraum wird konstruiert.<br />\n",
+               if ((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) $roomInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein Maschinenraum wird konstruiert.",
                        __CLASS__,
                        __LINE__
                ));
index 76d8ecfe433efcc5b8720cc4d05f5c7fdecd5fe3..724980be21c988f28f0374ec3c4d1392449b103e 100644 (file)
@@ -82,7 +82,7 @@ class SimulatorPersonell extends BasePersonell {
                $personellInstance = new SimulatorPersonell();
 
                // Debug message
-               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] Es werden <strong>%d</strong> Personal bereitgestellt.<br />\n",
+               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] Es werden <strong>%d</strong> Personal bereitgestellt.",
                        __CLASS__,
                        __LINE__,
                        $amountPersonell
@@ -97,7 +97,7 @@ class SimulatorPersonell extends BasePersonell {
                }
 
                // Debug message
-               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Personal bereitgestellt.<br />\n",
+               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Personal bereitgestellt.",
                        __CLASS__,
                        __LINE__,
                        $amountPersonell
@@ -194,10 +194,6 @@ class SimulatorPersonell extends BasePersonell {
        // Create personell list
        public function createPersonellList () {
                if (is_null($this->personellList)) {
-                       if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Personell-Liste erstellt.<br />\n",
-                               __CLASS__,
-                               __LINE__
-                       ));
                        $this->personellList = new FrameworkArrayObject("FakedPersonellList");
                } else {
                        throw new PersonellListAlreadyCreatedException($this, self::EXCEPTION_DIMENSION_ARRAY_INVALID);
@@ -206,10 +202,6 @@ class SimulatorPersonell extends BasePersonell {
 
        // Remove the personell list
        private function removePersonellList () {
-               if (defined('DEBUG_PERSONELL')) $this->getDebugInstance()->output(sprintf("[%s:%d] Personell-Liste entfernt.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                unset($this->personellList);
        }
 
@@ -251,7 +243,7 @@ class SimulatorPersonell extends BasePersonell {
 
                // The same (last) conditions?
                if (($serialized == $this->cacheCond) && (!is_null($this->cacheCond))) {
-                       if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Gecachte Liste wird verwendet.<br />\n",
+                       if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Gecachte Liste wird verwendet.",
                                __CLASS__,
                                __LINE__
                        ));
@@ -261,7 +253,7 @@ class SimulatorPersonell extends BasePersonell {
                }
 
                // Output debug message
-               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Personalliste wird nach Kriterien durchsucht...<br />\n",
+               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Personalliste wird nach Kriterien durchsucht...",
                        __CLASS__,
                        __LINE__
                ));
@@ -300,11 +292,6 @@ class SimulatorPersonell extends BasePersonell {
         * @return      $count  Amount of unemployed personell
         */
        public final function getAllUnemployed () {
-               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Es werden alle erwerbslosen Personen gesucht.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
-
                // Get a temporary list
                $list = $this->getSpecialPersonellList(false);
 
@@ -318,11 +305,6 @@ class SimulatorPersonell extends BasePersonell {
         * @return      void
         */
        private function removeCache () {
-               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Cache-Attribute entfernt.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
-
                // Remove cache data
                unset($this->cacheList);
                unset($this->cacheCond);
@@ -354,10 +336,6 @@ class SimulatorPersonell extends BasePersonell {
         * @return      void
         */
        public function resetCache () {
-               if ((defined('DEBUG_PERSONELL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Cache-Liste zur&uuml;ckgesetzt.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                $this->setAllCacheList(null);
                $this->setCacheCond("");
        }
index 06fcd7cba977d6359c7f5eb73a725d623fe8a27d..edcc3d4aaaded404d868ee277d28f6a40aebd179 100644 (file)
@@ -47,7 +47,7 @@ class CompanyEmployee extends SimulatorPersonell {
 
                // Debug message
                if (((defined('DEBUG_COMPANY_EMPLOYEE')) && (defined('DEBUG_PERSONELL'))) || (defined('DEBUG_ALL'))) {
-                       $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] Der/Die Angestellte <strong>%s %s</strong> wird angelegt.<br />\n",
+                       $personellInstance->getDebugInstance()->output(sprintf("[%s:%d] Der/Die Angestellte <strong>%s %s</strong> wird angelegt.",
                                __CLASS__,
                                __LINE__,
                                $surname,
@@ -86,12 +86,6 @@ class CompanyEmployee extends SimulatorPersonell {
 
        // Remove the employee list
        private function removeEmployeeList () {
-               if (((defined('DEBUG_COMPANY_EMPLOYEE')) && (defined('DEBUG_PERSONELL'))) || (defined('DEBUG_ALL'))) {
-                       $this->getDebugInstance()->output(sprintf("[%s:%d] Angestellten-List entfernt.<br />\n",
-                               __CLASS__,
-                               __LINE__
-                       ));
-               }
                unset($this->employeeList);
        }
 }
index 18d2eb80da6eaf3321cfd93b6fc4b6d3413c46f3..c8079a1e96151282146a23e30d3be3074090a97d 100644 (file)
@@ -62,7 +62,7 @@ class BaseShip extends BaseSimulator {
        // buildInstance = Das was in das Schiffsteil evtl. eingebaut werden soll (null = kein besonderes Teil einbauen!)
        // partClass = Das zu konstruierende Schiffsteil
        public function createShipPart (ConstructableShipPart $buildInstance, $partClass) {
-               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> erh&auml;lt ein neues Schiffsteil (%s).<br />\n",
+               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> erh&auml;lt ein neues Schiffsteil (%s).",
                        __CLASS__,
                        __LINE__,
                        $this->getShipName(),
@@ -82,7 +82,7 @@ class BaseShip extends BaseSimulator {
                try {
                        $partInstance->addShipPartToShip($this, $buildInstance);
                } catch (MotorShipMismatchException $e) {
-                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat keinen Motor erhalten! Grund: <strong>%s</strong><br />\n",
+                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat keinen Motor erhalten! Grund: <strong>%s</strong>",
                                __CLASS__,
                                __LINE__,
                                $this->getShipName(),
@@ -90,7 +90,7 @@ class BaseShip extends BaseSimulator {
                        ));
                        return false;
                } catch (RoomShipMismatchException $e) {
-                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat keinen Maschinenraum erhalten! Grund: <strong>%s</strong><br />\n",
+                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat keinen Maschinenraum erhalten! Grund: <strong>%s</strong>",
                                __CLASS__,
                                __LINE__,
                                $this->getShipName(),
@@ -99,7 +99,7 @@ class BaseShip extends BaseSimulator {
                        return false;
 
                } catch (StructureShipMismatchException $e) {
-                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat keine Aufbauten erhalten! Grund: <strong>%s</strong><br />\n",
+                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat keine Aufbauten erhalten! Grund: <strong>%s</strong>",
                                __CLASS__,
                                __LINE__,
                                $this->getShipName(),
@@ -107,7 +107,7 @@ class BaseShip extends BaseSimulator {
                        ));
                        return false;
                } catch (CabinShipMismatchException $e) {
-                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat keine Kabine erhalten! Grund: <strong>%s</strong><br />\n",
+                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat keine Kabine erhalten! Grund: <strong>%s</strong>",
                                __CLASS__,
                                __LINE__,
                                $this->getShipName(),
@@ -115,7 +115,7 @@ class BaseShip extends BaseSimulator {
                        ));
                        return false;
                } catch (DeckShipMismatchException $e) {
-                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat kein Deck erhalten! Grund: <strong>%s</strong><br />\n",
+                       if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat kein Deck erhalten! Grund: <strong>%s</strong>",
                                __CLASS__,
                                __LINE__,
                                $this->getShipName(),
@@ -128,7 +128,7 @@ class BaseShip extends BaseSimulator {
                $this->structures->append($partInstance);
 
                // Debug-Meldung ausgeben
-               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat das Schiffsteil <strong>%s</strong> eingebaut bekommen.<br />\n",
+               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Schiff <strong>%s</strong> hat das Schiffsteil <strong>%s</strong> eingebaut bekommen.",
                        __CLASS__,
                        __LINE__,
                        $this->getShipName(),
@@ -146,69 +146,31 @@ class BaseShip extends BaseSimulator {
 
        // STUB: Getter-Methode Anzahl Betten
        public function calcTotalBeds () {
-               $this->getDebugInstance()->output("[%s:%d] Stub! Anzahl Betten erreicht.<br />\n");
-               return 0;
+               $this->partialStub("Please implement this stub in your ship!");
        }
 
        // Setter-Methode fuer Schiffsnamen
        public final function setShipName ($shipName) {
-               // Cast the string
-               $shipName = (string) $shipName;
-
-               // Debug message
-               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das neue Schiff vom Typ <strong>%s</strong> wird auf den Namen <strong>%s</strong> getauft.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->__toString(),
-                       $shipName
-               ));
-
-               // Set ship name
-               $this->shipName = $shipName;
+               $this->shipName = (string) $shipName;
        }
 
        // Getter-Methode fuer Schiffsnamen
        public final function getShipName () {
-               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das <strong>%s</strong> ist auf den Namen <strong>%s</strong> getauft worden.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->__toString(),
-                       $this->shipName
-               ));
                return $this->shipName;
        }
 
        // Setter-Methode fuer Tiefgang
        public final function setDraught ($draught) {
-               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das <strong>%s</strong> mit dem Namen <strong>%s</strong> hat einen Tiefgang von <strong>%sm</strong>.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->__toString(),
-                       $this->shipName,
-                       $draught
-               ));
                $this->draught = (int) $draught;
        }
 
        // Getter-Methode fuer Tiefgang
        public final function getDraught() {
-               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Der Tiefgang des Schiffes <strong>%s</strong> wurde angefordert.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->shipName
-               ));
                return $this->draught;
        }
 
        // Setter-Methode fuer Anzahl Anker
        public final function setNumAnchor ($numAnchor) {
-               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das <strong>%s</strong> mit dem Namen <strong>%s</strong> hat <strong>%s</strong> Anker.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->__toString(),
-                       $this->shipName,
-                       $numAnchor
-               ));
                $this->numAnchor = (int) $numAnchor;
        }
 }
index f2ac31a9b143876deacba27359dbcd29213e470c..55363e24e1dba3e1d409ad5d96082d3713d2d4fe 100644 (file)
@@ -45,7 +45,7 @@ class PassengerShip extends BaseShip implements ConstructableShip {
 
                // Debug message
                if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) {
-                       $passInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein Passagier-Schiff wird erstellt.<br />\n",
+                       $passInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein Passagier-Schiff wird erstellt.",
                                __CLASS__,
                                __LINE__
                        ));
@@ -93,7 +93,7 @@ class PassengerShip extends BaseShip implements ConstructableShip {
                                        }
 
                                        // Debug-Meldung ausgeben
-                                       $this->getDebugInstance()->output(sprintf("[%s:%d] Es stehen <strong>%d</strong> Betten vom Kabinen-Typ <strong>%s</strong> bereit.<br />\n",
+                                       $this->getDebugInstance()->output(sprintf("[%s:%d] Es stehen <strong>%d</strong> Betten vom Kabinen-Typ <strong>%s</strong> bereit.",
                                                __CLASS__,
                                                __LINE__,
                                                $total,
@@ -102,7 +102,7 @@ class PassengerShip extends BaseShip implements ConstructableShip {
                                }
                        } else {
                                // Keine Kabine!
-                               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s</strong> ist keine Kabine.<br />\n",
+                               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s</strong> ist keine Kabine.",
                                        __CLASS__,
                                        __LINE__,
                                        $el->getObjectDescription()
@@ -110,7 +110,7 @@ class PassengerShip extends BaseShip implements ConstructableShip {
                        }
                } // END - for
 
-               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das <strong>%s</strong> mit dem Namen <strong>%s</strong> hat <strong>%d</strong> Betten.<br />\n",
+               if ((defined('DEBUG_SHIP')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das <strong>%s</strong> mit dem Namen <strong>%s</strong> hat <strong>%d</strong> Betten.",
                        __CLASS__,
                        __LINE__,
                        $this->getObjectDescription(),
index c1d6590da3b5f2cba0cf3ed5aeb8dcb1b2aefbb6..93819424e0762953eceb54a49ce56f590627d28f 100644 (file)
@@ -43,7 +43,7 @@ class EconomyCabin extends BaseCabin implements TradeableItem, ConstructableShip
                $ecoInstance = new EconomyCabin();
 
                // Debug message
-               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $ecoInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Economy-Class-Kabine wird konstruiert...<br />\n",
+               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $ecoInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Economy-Class-Kabine wird konstruiert...",
                        __CLASS__,
                        __LINE__
                ));
index cb8627a6e82e592b834dae4c02d9f246039e3282..52f9b2646e5ca1b0f3b179aced60c7d8898ed9e5 100644 (file)
@@ -43,7 +43,7 @@ class LowCabin extends BaseCabin implements TradeableItem, ConstructableShipPart
                $lowInstance = new LowCabin();
 
                // Debug message
-               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $lowInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine 2-Sterne-Kabine wird konstruiert...<br />\n",
+               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $lowInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine 2-Sterne-Kabine wird konstruiert...",
                        __CLASS__,
                        __LINE__
                ));
index 195ee8f4c0b012adbf0e417e6ba9bc98e8e007af..ac2f38dc4474a79d65e65a172e8bcdb046a46738 100644 (file)
@@ -43,7 +43,7 @@ class LuxuryCabin extends BaseCabin implements TradeableItem, ConstructableShipP
                $luxuryInstance = new LuxuryCabin();
 
                // Debug message
-               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $luxuryInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Luxuskabine wird konstruiert...<br />\n",
+               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $luxuryInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Luxuskabine wird konstruiert...",
                        __CLASS__,
                        __LINE__
                ));
index 30e573cf951fa48a6857c71933486625ad58917b..c44157e5a9997e0cb0374afbb3833f8798c5c139 100644 (file)
@@ -43,7 +43,7 @@ class PremierCabin extends BaseCabin implements TradeableItem, ConstructableShip
                $premierInstance = new PremierCabin();
 
                // Debug message
-               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $premierInstance->getDebugInstance()->output("[PremierCabin:] Eine Premier-Kabine wird konstruiert...<br />\n");
+               if ((defined('DEBUG_CABIN')) || (defined('DEBUG_ALL'))) $premierInstance->getDebugInstance()->output("[PremierCabin:] Eine Premier-Kabine wird konstruiert...");
 
                // Abmasse extrahieren
                $premierInstance->extractDimensions($dim);
index 918f66e00b7fac094d7a917bf330c77f66a14d2d..5629ca4648182b89bd9d5c14fd6750cc9a044ed2 100644 (file)
@@ -43,7 +43,7 @@ class BaseCabinStructure extends BaseStructure {
 
        // Kabine hinzufuegen
        public function addShipPartToShip (ConstructableShip $shipInstance, ConstructableShipPart $cabinInstance) {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Kabine <strong>%s</strong> wird f&uuml;r das Schiff <strong>%s</strong> konstruiert.<br />\n",
+               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Kabine <strong>%s</strong> wird f&uuml;r das Schiff <strong>%s</strong> konstruiert.",
                        __CLASS__,
                        __LINE__,
                        $cabinInstance->getObjectDescription(),
@@ -67,7 +67,7 @@ class BaseCabinStructure extends BaseStructure {
                $this->setDeckInstance($cabinInstance);
 
                // Einbaut-Meldung ausgeben
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Kabine <strong>%s</strong> wurde in das Schiff eingebaut.<br />\n",
+               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Die Kabine <strong>%s</strong> wurde in das Schiff eingebaut.",
                        __CLASS__,
                        __LINE__,
                        $cabinInstance->getObjectDescription(),
@@ -77,87 +77,46 @@ class BaseCabinStructure extends BaseStructure {
 
        // Wrapper fuer setDeckInstance->setPartInstance
        public final function setDeckInstance ($deck) {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Wrapper setDeckInstance->setPartInstance erreicht.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                parent::setPartInstance($deck);
        }
 
        // Getter-Methode fuer Anzahl Betten
        public final function getNumBeds () {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Betten angefordert.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->numBeds
-               ));
                return $this->numBeds;
        }
 
        // Getter-Methode fuer Anzahl Kabinen
        public final function getNumCabin () {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Kabine(n) angefordert.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $this->numCabin
-               ));
                return $this->numCabin;
        }
 
        // Setter-Methode fuer Anzahl Betten
        public final function setNumBeds ($numBeds) {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Betten gesetzt.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $numBeds
-               ));
                $this->numBeds = $numBeds;
        }
 
        // Setter-Methode fuer Anzahl Raeume
        public final function setNumRooms ($numRooms) {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Raum/R&auml;ume gesetzt.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $numRooms
-               ));
                $this->numRooms = $numRooms;
        }
 
        // Setter-Methode fuer Anzahl Kabinen
        public final function setNumCabin ($numCabin) {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%d</strong> Kabine(n) gesetzt.<br />\n",
-                       __CLASS__,
-                       __LINE__,
-                       $numCabin
-               ));
                $this->numCabin = $numCabin;
        }
 
        // Loesch-Methode fuer Anzahl Betten
        public final function removeNumBeds() {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Betten gel&ouml;scht.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                unset($this->numBeds);
        }
 
        // Loesch-Methode fuer Anzahl Kabinen
        public final function removeNumCabin() {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Kabinen gel&ouml;scht.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                unset($this->numCabin);
        }
 
        // Loesch-Methode fuer Anzahl Raeume
        public final function removeNumRooms() {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl R&auml;ume gel&ouml;scht.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                unset($this->numRooms);
        }
 
@@ -177,7 +136,7 @@ class BaseCabinStructure extends BaseStructure {
                        }
 
                        // Debug-Meldung ausgeben
-                       $this->getDebugInstance()->output(sprintf("[%s:%d] Es exisitieren <strong>%d</strong> Kabinen vom Typ <strong>%s</strong> zu je <strong>%d</strong> Betten. Das sind <strong>%d</strong> Betten.<br />\n",
+                       $this->getDebugInstance()->output(sprintf("[%s:%d] Es exisitieren <strong>%d</strong> Kabinen vom Typ <strong>%s</strong> zu je <strong>%d</strong> Betten. Das sind <strong>%d</strong> Betten.",
                                __CLASS__,
                                __LINE__,
                                $num,
index 60ec1c712f83de5a3de35586e77cd49ff83c47bc..d50323196be3fccfcff83a5b034a24e2ba0f8603 100644 (file)
@@ -36,7 +36,7 @@ class BaseDeckStructure extends BaseStructure {
 
        // Deckstruktur dem Schiff hinzufuegen
        public function addShipPartToShip (ConstructableShip $shipInstance, ConstructableShipPart $deckInstance) {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Deck <strong>%s</strong> wird f&uuml;r das Schiff <strong>%s</strong> konstruiert.<br />\n",
+               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Deck <strong>%s</strong> wird f&uuml;r das Schiff <strong>%s</strong> konstruiert.",
                        __CLASS__,
                        __LINE__,
                        $deckInstance->getObjectDescription(),
@@ -50,7 +50,7 @@ class BaseDeckStructure extends BaseStructure {
                $this->setNumDecks($deckInstance->getNumDecks());
                $deckInstance->removeNumDecks();
 
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Deck <strong>%s</strong> wurde in das Schiff <strong>%s</strong> eingebaut.<br />\n",
+               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Das Deck <strong>%s</strong> wurde in das Schiff <strong>%s</strong> eingebaut.",
                        __CLASS__,
                        __LINE__,
                        $deckInstance->getObjectDescription(),
@@ -60,10 +60,6 @@ class BaseDeckStructure extends BaseStructure {
 
        // Deckanzahl entfernen
        public final function removeNumDecks() {
-               if ((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Anzahl Decks wurde gel&ouml;scht.<br />\n",
-                       __CLASS__,
-                       __LINE__
-               ));
                unset($this->numDecks);
        }
 
index 4977d8f17ceea9e4c204b2b517ec880efcc8b33f..31b2c2c1250107c262133d39ab1e85ef8fb03844 100644 (file)
@@ -43,7 +43,7 @@ class CarDeck extends BaseDeck implements TradeableItem, ConstructableShipPart {
                $carInstance = new CarDeck();
 
                // Debug message
-               if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $carInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein Autodeck wird konstruiert...<br />\n",
+               if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $carInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein Autodeck wird konstruiert...",
                        __CLASS__,
                        __LINE__
                ));
index 20450f7db9d7c1caf5ed3b74ae7afd7f92c82119..c8c1912c651228efdf83b08f2898e9e3fe704c18 100644 (file)
@@ -43,7 +43,7 @@ class TrainDeck extends BaseDeck implements TradeableItem, ConstructableShipPart
                $trainInstance = new TrainDeck();
 
                // Debug message
-               if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $trainInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein LKW-Deck wird konstruiert...<br />\n",
+               if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $trainInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein LKW-Deck wird konstruiert...",
                        __CLASS__,
                        __LINE__
                ));
index a20bbc2c3bc529b6624f3bb0b59614d2df8116b5..198c050170dea2fe0744a7e66d8835d4bbafacd7 100644 (file)
@@ -44,7 +44,7 @@ class TruckDeck extends BaseDeck implements TradeableItem, ConstructableShipPart
                $truckInstance = new TruckDeck();
 
                // Debug message
-               if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $truckInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein LKW-Deck wird konstruiert...<br />\n",
+               if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $truckInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein LKW-Deck wird konstruiert...",
                        __CLASS__,
                        __LINE__
                ));
index 1cbad177c4f1e7e2c387a59b7c9820c39afeaefa..032d2d1b3ecff014e720f6bc72eaa5fa937c1adc 100644 (file)
@@ -44,7 +44,7 @@ class Bridge extends BaseUpperStructure implements TradeableItem, ConstructableS
                $bridgeInstance = new Bridge();
 
                // Debug message
-               if ((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) $bridgeInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Br&uuml;cke wird konstruiert...<br />\n",
+               if ((defined('DEBUG_MODE')) || (defined('DEBUG_ALL'))) $bridgeInstance->getDebugInstance()->output(sprintf("[%s:%d] Eine Br&uuml;cke wird konstruiert...",
                        __CLASS__,
                        __LINE__
                ));
index ea13f46ad7d71bdb95518a08ce2ddf4744883ee4..f85d6948c247779e08c7329dc4bb0d3e99c8279a 100644 (file)
@@ -31,7 +31,7 @@ class UserInstanceMissingException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Registry key <span id=\"exception_reason\">%s</span> does not include a class with implemented interface <u>ManageableUser</u>.",
+               $message = sprintf("[%s:%d] Registry key <span id=\"exception_reason\">%s</span> does not include a class with implemented interface <u>Manageable(User|Guest)</u>.",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
diff --git a/inc/classes/interfaces/mailer/.htaccess b/inc/classes/interfaces/mailer/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/mailer/class_DeliverableMail.php b/inc/classes/interfaces/mailer/class_DeliverableMail.php
new file mode 100644 (file)
index 0000000..522dbb9
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An interface for deliverable mail aka. mailer classes
+ *
+ * @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/>.
+ */
+interface DeliverableMail extends FrameworkInterface {
+}
+
+//
+?>
diff --git a/inc/classes/interfaces/user/class_ManageableAccount.php b/inc/classes/interfaces/user/class_ManageableAccount.php
new file mode 100644 (file)
index 0000000..bf091f8
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+/**
+ * An interface for manageable accounts (logged-in users and guests likewise)
+ *
+ * @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/>.
+ */
+interface ManageableAccount extends FrameworkInterface {
+       /**
+        * Determines wether the username exists or not
+        *
+        * @return      $exists         Wether the username exists
+        */
+       function ifUsernameExists ();
+
+       /**
+        * Determines wether the email exists or not
+        *
+        * @return      $exists         Wether the email exists
+        */
+       function ifEmailAddressExists ();
+
+       /**
+        * Checks if the supplied password hash in request matches with the stored
+        * in database.
+        *
+        * @param       $requestInstance        A requestable class instance
+        * @return      $matches                        Wether the supplied password hash matches
+        */
+       function ifPasswordHashMatches (Requestable $requestInstance);
+
+       /**
+        * Adds data for later complete update
+        *
+        * @param       $column         Column we want to update
+        * @param       $value          New value to store in database
+        * @return      void
+        */
+       function addUpdateData ($column, $value);
+}
+
+//
+?>
diff --git a/inc/classes/interfaces/user/class_ManageableUser.php b/inc/classes/interfaces/user/class_ManageableUser.php
deleted file mode 100644 (file)
index 4dafed2..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/**
- * An interface for manageable users
- *
- * @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/>.
- */
-interface ManageableUser extends FrameworkInterface {
-       /**
-        * Determines wether the username exists or not
-        *
-        * @return      $exists         Wether the username exists
-        */
-       function ifUsernameExists ();
-
-       /**
-        * Determines wether the email exists or not
-        *
-        * @return      $exists         Wether the email exists
-        */
-       function ifEmailAddressExists ();
-
-       /**
-        * Checks if the supplied password hash in request matches with the stored
-        * in database.
-        *
-        * @param       $requestInstance        A requestable class instance
-        * @return      $matches                        Wether the supplied password hash matches
-        */
-       function ifPasswordHashMatches (Requestable $requestInstance);
-
-       /**
-        * Adds data for later complete update
-        *
-        * @param       $column         Column we want to update
-        * @param       $value          New value to store in database
-        * @return      void
-        */
-       function addUpdateData ($column, $value);
-}
-
-//
-?>
diff --git a/inc/classes/interfaces/user/extended/.htaccess b/inc/classes/interfaces/user/extended/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/user/extended/class_ManageableGuest.php b/inc/classes/interfaces/user/extended/class_ManageableGuest.php
new file mode 100644 (file)
index 0000000..2884ea8
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An interface for manageable guests
+ *
+ * @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/>.
+ */
+interface ManageableGuest extends ManageableAccount {
+}
+
+//
+?>
diff --git a/inc/classes/interfaces/user/extended/class_ManageableUser.php b/inc/classes/interfaces/user/extended/class_ManageableUser.php
new file mode 100644 (file)
index 0000000..7f4c191
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An interface for manageable users
+ *
+ * @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/>.
+ */
+interface ManageableUser extends ManageableAccount {
+}
+
+//
+?>
index 7a738d6b26f9584dd5053c9e4acf90db922a6c65..ea3201f20a0cfbcb0c5d5555504e607d7d737696 100644 (file)
@@ -199,7 +199,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                if ($this->__toString() != "DestructedObject") {
                        // Debug message
                        if ((defined('DEBUG_DESTRUCTOR')) && (is_object($this->getDebugInstance()))) {
-                               $this->getDebugInstance()->output(sprintf("[%s:] Das Objekt <strong>%s</strong> wird zerst&ouml;rt.<br />\n",
+                               $this->getDebugInstance()->output(sprintf("[%s:] Das Objekt <strong>%s</strong> wird zerst&ouml;rt.",
                                        __CLASS__, $this->__toString()
                                ));
                        } // END - if
@@ -210,7 +210,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        $this->resetUniqueID();
                } elseif ((defined('DEBUG_DESTRUCTOR')) && (is_object($this->getDebugInstance()))) {
                        // Already destructed object
-                       $this->getDebugInstance()->output(sprintf("[%s:] Das Objekt <strong>%s</strong> wurde bereits zerst&ouml;rt.<br />\n",
+                       $this->getDebugInstance()->output(sprintf("[%s:] Das Objekt <strong>%s</strong> wurde bereits zerst&ouml;rt.",
                                __CLASS__, $this->__toString()
                        ));
                }
index 778e7d8bb0f2c62f07faa4c382eec916c1ec24e3..b48868371459a19e8de2a04b2c939c115abc7776 100644 (file)
@@ -44,8 +44,8 @@ class ???Command extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function create???Command (CommandResolver $resolverInstance) {
                // Get new instance
@@ -61,8 +61,8 @@ class ???Command extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index 3dde736e3c61adf3564cfcf9dfb61c3b3f8b13c3..019ddd7b213dcb6d84e65410f28cb781f68d7ab3 100644 (file)
@@ -44,8 +44,8 @@ class WebDoFormCommand extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function createWebDoFormCommand (CommandResolver $resolverInstance) {
                // Get new instance
@@ -61,8 +61,8 @@ class WebDoFormCommand extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index d04e77a07e07282dc300a5747fb2b1a3baa70ee3..84ef272368fdfdd706a19c9953d6630a9291305a 100644 (file)
@@ -44,8 +44,8 @@ class WebHomeCommand extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function createWebHomeCommand (CommandResolver $resolverInstance) {
                // Get new instance
@@ -61,8 +61,8 @@ class WebHomeCommand extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index 63a86a72d0fbd2bfc2447262e13530df149957a1..0848cf5828b53653fbcd114118900552273716d3 100644 (file)
@@ -49,8 +49,8 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function createWebLoginAreaCommand (CommandResolver $resolverInstance) {
                // Get new instance
@@ -78,8 +78,8 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index 6fadf047f33c010e7cd9594a1ff605289fe1d62d..a37949dd99008b12c79ba9261a0e5ef1c2917106 100644 (file)
@@ -44,8 +44,8 @@ class WebLoginCommand extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function createWebLoginCommand (CommandResolver $resolverInstance) {
                // Get new instance
@@ -61,8 +61,8 @@ class WebLoginCommand extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index eead89a417fcca894ed9dfca21192c27778a0189..0d1d068982c5e9a921a55c70a8c88ac30fcc9282 100644 (file)
@@ -44,8 +44,8 @@ class WebLoginFailedCommand extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function createWebLoginFailedCommand (CommandResolver $resolverInstance) {
                // Get new instance
@@ -61,8 +61,8 @@ class WebLoginFailedCommand extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index 3759b5ef4ddb636532692959239a516a77908b09..cd09a40dd63f5e3f830e18aca484699a0b6dc73f 100644 (file)
@@ -44,8 +44,8 @@ class WebLogoutDoneCommand extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function createWebLogoutDoneCommand (CommandResolver $resolverInstance) {
                // Get new instance
@@ -61,8 +61,8 @@ class WebLogoutDoneCommand extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index f4cc32548d184ba7a6de657f78bbb28349236fa1..bc10daf07a9cf44ed052e9135d22c54a12f92e14 100644 (file)
@@ -44,8 +44,8 @@ class WebRegisterCommand extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function createWebRegisterCommand (CommandResolver $resolverInstance) {
                // Get new instance
@@ -61,8 +61,8 @@ class WebRegisterCommand extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index ba9f9f571692c1a13dcb81602de6b065007dc6f1..887712e75f078900c01dde9d9d40cc04ae86746d 100644 (file)
@@ -44,8 +44,8 @@ class WebResendLinkCommand extends BaseCommand implements Commandable {
        /**
         * Creates an instance of this class
         *
-        * @param       $resolverInstance               An instance of a command resolver class
-        * @return      $commandInstance                An instance a prepared command class
+        * @param       $resolverInstance       An instance of a command resolver class
+        * @return      $commandInstance        An instance a prepared command class
         */
        public final static function createWebResendLinkCommand (CommandResolver $resolverInstance) {
                // Get new instance
@@ -61,12 +61,28 @@ class WebResendLinkCommand extends BaseCommand implements Commandable {
        /**
         * Executes the given command with given request and response objects
         *
-        * @param       $requestInstance                An instance of a class with an Requestable interface
-        * @param       $responseInstance               An instance of a class with an Responseable interface
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
-               $this->debugInstance();
+               // Get a user instance from registry
+               $userInstance = Registry::getRegistry()->getInstance('user');
+
+               // Get a mailer class
+               $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class');
+
+               // Load the mail template
+               $mailerInstance->loadTemplate("resend_link");
+
+               // Add the recipient
+               $mailerInstance->addRecipientByUser($userInstance);
+
+               // Set subject line from template
+               $mailerInstance->setSubjectFromTemplate();
+
+               // Send the email out
+               $mailerInstance->deliverEmail();
        }
 
        /**
index ffd8b8e7504f40216fef2382262bcb1ce0a5b60a..eaf60aab44e0df4bef230ce774e047b9618c2e09 100644 (file)
@@ -56,7 +56,7 @@ class ConsoleTools extends BaseFrameworkSystem {
 
                        // Read the file
                        $hostname = trim($io->readFromFile());
-                       $helper->getDebugInstance()->output(sprintf("[%s:] Our host name is: <strong>%s</strong><br />\n",
+                       $helper->getDebugInstance()->output(sprintf("[%s:] Our host name is: <strong>%s</strong>",
                                $helper->__toString(),
                                $hostname
                        ));
@@ -71,7 +71,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                                $ip = $ipResolved;
 
                                // Debug message
-                               $helper->getDebugInstance()->output(sprintf("[%s:] Resolved IP address is: <strong>%s</strong><br />\n",
+                               $helper->getDebugInstance()->output(sprintf("[%s:] Resolved IP address is: <strong>%s</strong>\n",
                                        $helper->__toString(),
                                        $ip
                                ));
index 48c9aade9deee131ad4bb1aca0b42b005c96a93b..9c366b6a6022785e778c418d817031a175169967 100644 (file)
@@ -58,7 +58,9 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStre
         * @return      void
         */
        public final function outputStream ($output) {
-               print($output);
+               // Strip out <br />
+               $output = str_replace("<br />", "", $output);
+               print($output."<br />\n");
        }
 
        /**
index c7d060cd8a5b16b1855f27be41a8e2a1ca0712c0..b4b37cf3287ebc875ad49b2d9ad5a671534ba8d5 100644 (file)
@@ -77,6 +77,9 @@ class UserUnconfirmedVerifierFilter extends BaseFrameworkSystem implements Filte
                        // Stop processing here
                        exit();
                } // END - if
+
+               // Add this instance to registry
+               Registry::getRegistry()->addInstance('user', $userInstance);
        }
 }
 
diff --git a/inc/classes/main/mailer/.htaccess b/inc/classes/main/mailer/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/mailer/class_ b/inc/classes/main/mailer/class_
new file mode 100644 (file)
index 0000000..2d19163
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+/**
+ * 
+ *
+ * @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 ???Mailer extends BaseMailer implements DeliverableMail {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set part description
+               $this->setObjectDescription("");
+
+               // Create unique ID number
+               $this->generateUniqueId();
+       }
+
+       /**
+        * Creates an instance of this mailer class
+        *
+        * @return      $mailerInstance         An instance of this mailer class
+        */
+       public final static function create???Mailer () {
+               // Get a new instance
+               $mailerInstance = new ???Mailer();
+
+               // Return the instance
+               return $mailerInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/mailer/class_BaseMailer.php b/inc/classes/main/mailer/class_BaseMailer.php
new file mode 100644 (file)
index 0000000..a3ab5a2
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/**
+ * A general mailer class for all other mailers
+ *
+ * @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 BaseMailer extends BaseFrameworkSystem {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/mailer/debug/.htaccess b/inc/classes/main/mailer/debug/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/mailer/debug/class_DebugMailer.php b/inc/classes/main/mailer/debug/class_DebugMailer.php
new file mode 100644 (file)
index 0000000..5c2049f
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+/**
+ * 
+ *
+ * @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 DebugMailer extends BaseMailer implements DeliverableMail {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set part description
+               $this->setObjectDescription("A mailer for debugging purposes");
+
+               // Create unique ID number
+               $this->generateUniqueId();
+       }
+
+       /**
+        * Creates an instance of this mailer class
+        *
+        * @return      $mailerInstance         An instance of this mailer class
+        */
+       public final static function createDebugMailer () {
+               // Get a new instance
+               $mailerInstance = new DebugMailer();
+
+               // Return the instance
+               return $mailerInstance;
+       }
+}
+
+// [EOF]
+?>
index d07317a4b1b3809f361a904b70d78decf5862aeb..aa8878ed305c087a8f9486701bcb6cd86b34ead4 100644 (file)
@@ -21,7 +21,7 @@
  * 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 Guest extends BaseFrameworkSystem implements ManageableUser, Registerable {
+class Guest extends BaseFrameworkSystem implements ManageableGuest, Registerable {
        /**
         * Instance of the database result
         */
index 7ac8fa91962417b1ad1cf694c797fc7c0826ccc8..68f7d7c88fa910813ca8b1b23ded0b711f181bb4 100644 (file)
@@ -194,7 +194,7 @@ $cfg->setConfigEntry('username_verifier_class', "UserNameVerifierFilter");
 // CFG: EMAIL-VERIFIER
 $cfg->setConfigEntry('email_verifier_class', "EmailVerifierFilter");
 
-// CFG: PASSWORD-VERIFIER
+// CFG: PASSWORD-VERIFIER-CLASS
 $cfg->setConfigEntry('password_verifier_class', "PasswordVerifierFilter");
 
 // CFG: EMAIL-CHANGE-CLASS
@@ -212,21 +212,24 @@ $cfg->setConfigEntry('user_status_class', "UserStatusVerifierFilter");
 // CFG: USER-UNCONFIRMED-CLASS
 $cfg->setConfigEntry('user_unconfirmed_class', "UserUnconfirmedVerifierFilter");
 
-// CFG: CRYPTO-HELPER
+// CFG: CRYPTO-CLASS
 $cfg->setConfigEntry('crypto_class', "CryptoHelper");
 
 // CFG: RNG-CLASS
 $cfg->setConfigEntry('rng_class', "RandomNumberGenerator");
 
-// CFG: USER-DB-WRAPPER
+// CFG: USER-DB-WRAPPER-CLASS
 $cfg->setConfigEntry('user_db_wrapper_class', "UserDatabaseWrapper");
 
-// CFG: NEWS-DB-WRAPPER
+// CFG: NEWS-DB-WRAPPER-CLASS
 $cfg->setConfigEntry('news_db_wrapper_class', "NewsDatabaseWrapper");
 
-// CFG: WEB-CMD-RESOLVER
+// CFG: WEB-CMD-RESOLVER-CLASS
 $cfg->setConfigEntry('web_cmd_resolver_class', "WebCommandResolver");
 
+// CFG: MAILER-CLASS
+$cfg->setConfigEntry('mailer_class', "DebugMailer");
+
 // CFG: MATH-PRIME
 $cfg->setConfigEntry('math_prime', 591623);
 
index 613d6d2df80d560a4f18a4a11497ddadd74f4372..3c85645caba36b775cb8787afb92c613a420f53d 100644 (file)
 try {
        $layer = LocalFileDatabase::createLocalFileDatabase(PATH . FrameworkConfiguration::getInstance()->readConfig('local_db_path'), FileIoHandler::getInstance());
 } catch (SavePathIsEmptyException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
                $e->getMessage()
        ));
 } catch (SavePathNotFoundException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
                $e->getMessage()
        ));
 } catch (SavePathIsNoDirectoryException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
                $e->getMessage()
        ));
 } catch (SavePathReadProtectedException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
                $e->getMessage()
        ));
 } catch (SavePathWriteProtectedException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
                $e->getMessage()
        ));
 }
index 1091a5b8a9ebd105d4aa5944eb4856c0e6785a92..f8b1718b785a13ca27775b48485c2ff372cda1ce 100644 (file)
@@ -27,11 +27,11 @@ print (basename(__FILE__).": Init completed.\n\n");
 /**
  * A test case for the configuration sub system
  *
- * @author             Roland Haeder <webmaster@mxchange.org>
+ * @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
+ * @link               http://www.ship-simu.org
  * @see                        http://www.phpunit.de
  *
  * This program is free software: you can redistribute it and/or modify
index 4efbbb01685020234d6e8fd0df61e9972d25b302..f83c6d0dd5af7cd10e87a9018e4efe5a831d36ea 100644 (file)
@@ -27,11 +27,11 @@ print (basename(__FILE__).": Init completed.\n\n");
 /**
  * A test case for the registry
  *
- * @author             Roland Haeder <webmaster@mxchange.org>
+ * @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
+ * @link               http://www.ship-simu.org
  * @see                        http://www.phpunit.de
  *
  * This program is free software: you can redistribute it and/or modify
@@ -58,7 +58,7 @@ class RegistryTest extends PHPUnit_Framework_TestCase {
                $registryInstance = Registry::getRegistry();
 
                // Create a User instance
-               $userInstance = User::createUserByEmail("webmaster@mxchange.org");
+               $userInstance = User::createUserByEmail("webmaster@ship-simu.org");
 
                // Now store the instance in the registry
                $registryInstance->addInstance('user', $userInstance);
@@ -82,7 +82,7 @@ class RegistryTest extends PHPUnit_Framework_TestCase {
                $userInstance = $registryInstance->getInstance('user');
 
                // Compare both unique keys
-               $testPassed = ($userInstance instanceof ManageableUser);
+               $testPassed = ($userInstance instanceof ManageableAccount);
 
                // Test passed?
                if (!$testPassed) {
index c4edab05afc9d5a4b8fb0e870e49f814f5299010..a257260109e944e925d31ab0ccc3c9e7ebea5ccc 100644 (file)
@@ -28,11 +28,11 @@ print (basename(__FILE__).": Init completed.\n\n");
  * A test case for faked HTTP requests. This is faked because we *set*
  * $_REQUEST here. This should be made better in PHP6... :(
  *
- * @author             Roland Haeder <webmaster@mxchange.org>
+ * @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
+ * @link               http://www.ship-simu.org
  * @see                        http://www.phpunit.de
  *
  * This program is free software: you can redistribute it and/or modify
@@ -71,6 +71,32 @@ class RequestTest extends PHPUnit_Framework_TestCase {
                        ));
                }
        }
+
+       /**
+        * Now fake a request array and try the test on it again
+        *
+        * @return      void
+        */
+       public function testFakeRequestElement () {
+               // Fake the request here
+               $_REQUEST = array('test_key' => "test_value");
+
+               // Again get an instance
+               $requestInstance = HttpRequest::createHttpRequest();
+
+               // Get the element
+               $testValue = $requestInstance->getRequestElement('test_key');
+
+               // Is it the same?
+               if ($testValue !== "test_value") {
+                       // Something went wrong
+                       $this->fail(sprintf("[%s] Unexpected value %s (%s) from test key received.",
+                               $requestInstance->__toString(),
+                               $testValue,
+                               gettype($testValue)
+                       ));
+               }
+       }
 }
 
 ?>
index 284f9b22a1105e8ce7ccac24b08766fe28576707..6f2ecd526ae99b74348fc09cb18f7ad819ffe250 100644 (file)
@@ -28,11 +28,11 @@ die("You need to remove this line (".__LINE__.") and implement this test!\n");
 /**
  * A test case for 
  *
- * @author             Roland Haeder <webmaster@mxchange.org>
+ * @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
+ * @link               http://www.ship-simu.org
  * @see                        http://www.phpunit.de
  *
  * This program is free software: you can redistribute it and/or modify