Code base synced
authorRoland Häder <roland@mxchange.org>
Thu, 9 Oct 2008 16:34:43 +0000 (16:34 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 9 Oct 2008 16:34:43 +0000 (16:34 +0000)
94 files changed:
.gitattributes
inc/classes.php
inc/classes/exceptions/actions/class_InvalidActionException.php
inc/classes/exceptions/auth/class_UserAuthorizationException.php
inc/classes/exceptions/class_FrameworkException.php
inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php
inc/classes/exceptions/controller/class_InvalidControllerException.php
inc/classes/exceptions/database/general/class_SqlException.php
inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php
inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php
inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php
inc/classes/exceptions/database/wrapper/class_WrapperUserNameNotFoundException.php
inc/classes/exceptions/helper/class_FormClosedException.php
inc/classes/exceptions/helper/class_FormGroupClosedException.php
inc/classes/exceptions/helper/class_HelperNoPreviousOpenedSubGroupException.php
inc/classes/exceptions/helper/class_NoGroupOpenedException.php
inc/classes/exceptions/helper/class_UserInstanceMissingException.php
inc/classes/exceptions/io/class_DirPointerNotOpenedException.php
inc/classes/exceptions/io/class_FileNotFoundException.php
inc/classes/exceptions/io/class_FilePointerNotOpenedException.php
inc/classes/exceptions/io/class_FileReadProtectedException.php
inc/classes/exceptions/io/class_InvalidDataLengthException.php
inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php
inc/classes/exceptions/io/class_PathIsNoDirectoryException.php
inc/classes/exceptions/io/class_PathReadProtectedException.php
inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php
inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php
inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php
inc/classes/exceptions/main/class_ClassMismatchException.php
inc/classes/exceptions/main/class_ClassNotFoundException.php
inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php
inc/classes/exceptions/main/class_DimNotFoundInArrayException.php
inc/classes/exceptions/main/class_EmptyVariableException.php
inc/classes/exceptions/main/class_ExceptionNotFoundException.php
inc/classes/exceptions/main/class_GetterNotFoundException.php
inc/classes/exceptions/main/class_InvalidArrayCountException.php
inc/classes/exceptions/main/class_InvalidCommandException.php
inc/classes/exceptions/main/class_InvalidCommandInstanceException.php
inc/classes/exceptions/main/class_InvalidInterfaceException.php
inc/classes/exceptions/main/class_MissingArrayElementsException.php
inc/classes/exceptions/main/class_NoArrayCreatedException.php
inc/classes/exceptions/main/class_NoArrayException.php
inc/classes/exceptions/main/class_NoObjectException.php
inc/classes/exceptions/main/class_VariableIsNotSetException.php
inc/classes/exceptions/result/class_InvalidDatabaseResultException.php
inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php
inc/classes/exceptions/template/class_BasePathReadProtectedException.php
inc/classes/exceptions/template/class_InvalidBasePathStringException.php
inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php
inc/classes/exceptions/template/class_ViewHelperNotFoundException.php
inc/classes/exceptions/user/class_UserEmailMissingException.php
inc/classes/exceptions/user/class_UserPasswordMismatchException.php
inc/classes/exceptions/user/class_UsernameMissingException.php
inc/classes/interfaces/discovery/.htaccess [new file with mode: 0644]
inc/classes/interfaces/discovery/class_Discoverable.php [new file with mode: 0644]
inc/classes/main/actions/web/class_WebLoginProfileAction.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/commands/web/class_WebResendLinkCommand.php
inc/classes/main/console/class_ConsoleTools.php
inc/classes/main/controller/captcha/class_ImageCodeCaptchaController.php
inc/classes/main/controller/class_BaseController.php
inc/classes/main/controller/login/class_WebLoginAreaController.php
inc/classes/main/controller/web/class_WebConfirmController.php
inc/classes/main/controller/web/class_WebDefaultNewsController.php
inc/classes/main/controller/web/class_WebLogoutController.php
inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php [new file with mode: 0644]
inc/classes/main/debug/class_DebugConsoleOutput.php
inc/classes/main/debug/class_DebugWebOutput.php
inc/classes/main/discovery/.htaccess [new file with mode: 0644]
inc/classes/main/discovery/class_ [new file with mode: 0644]
inc/classes/main/discovery/class_BaseDiscovery.php [new file with mode: 0644]
inc/classes/main/discovery/payment/.htaccess [new file with mode: 0644]
inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php [new file with mode: 0644]
inc/classes/main/factories/objects/class_ObjectFactory.php
inc/classes/main/filter/payment/.htaccess [new file with mode: 0644]
inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php [new file with mode: 0644]
inc/classes/main/helper/web/forms/class_WebFormHelper.php
inc/classes/main/output/class_ConsoleOutput.php
inc/classes/main/output/class_WebOutput.php
inc/classes/main/points/class_UserPoints.php
inc/classes/main/reader/class_DefaultNewsReader.php
inc/classes/main/resolver/action/class_BaseActionResolver.php
inc/classes/main/response/class_BaseResponse.php
inc/classes/main/template/class_BaseTemplateEngine.php
inc/classes/main/user/member/class_Member.php
inc/classes/middleware/compressor/class_CompressorChannel.php
inc/config.php
inc/config/class_FrameworkConfiguration.php
inc/database.php
inc/database/lib-local.php
inc/file_io.php
inc/includes.php
inc/language.php
inc/selector.php

index 963494c..5fd7e66 100644 (file)
@@ -175,6 +175,8 @@ inc/classes/interfaces/database/middleware/.htaccess -text
 inc/classes/interfaces/database/middleware/class_DatabaseConnector.php -text
 inc/classes/interfaces/debug/.htaccess -text
 inc/classes/interfaces/debug/class_Debugger.php -text
+inc/classes/interfaces/discovery/.htaccess -text
+inc/classes/interfaces/discovery/class_Discoverable.php -text
 inc/classes/interfaces/extended/.htaccess -text
 inc/classes/interfaces/extended/class_LimitableObject.php -text
 inc/classes/interfaces/filter/.htaccess -text
@@ -305,12 +307,18 @@ inc/classes/main/database/databases/.htaccess -text
 inc/classes/main/database/databases/class_LocalFileDatabase.php -text
 inc/classes/main/database/wrapper/.htaccess -text
 inc/classes/main/database/wrapper/class_NewsDatabaseWrapper.php -text
+inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php -text
 inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php -text
 inc/classes/main/database/wrapper/class_UserPointsDatabaseWrapper.php -text
 inc/classes/main/debug/.htaccess -text
 inc/classes/main/debug/class_DebugConsoleOutput.php -text
 inc/classes/main/debug/class_DebugErrorLogOutput.php -text
 inc/classes/main/debug/class_DebugWebOutput.php -text
+inc/classes/main/discovery/.htaccess -text
+inc/classes/main/discovery/class_ -text
+inc/classes/main/discovery/class_BaseDiscovery.php -text
+inc/classes/main/discovery/payment/.htaccess -text
+inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php -text
 inc/classes/main/extended/.htaccess -text
 inc/classes/main/extended/class_ObjectLimits.php -text
 inc/classes/main/extended/class_SerializationContainer.php -text
@@ -344,6 +352,8 @@ inc/classes/main/filter/news/class_NewsDownloadFilter.php -text
 inc/classes/main/filter/news/class_NewsProcessFilter.php -text
 inc/classes/main/filter/null/.htaccess -text
 inc/classes/main/filter/null/class_NullFilter.php -text
+inc/classes/main/filter/payment/.htaccess -text
+inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php -text
 inc/classes/main/filter/update/.htaccess -text
 inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php -text
 inc/classes/main/filter/update/class_UserUpdateFilter.php -text
index 5a541c9..78bafeb 100644 (file)
@@ -35,19 +35,19 @@ foreach ($lowerClasses as $className) {
        try {
                ClassLoader::getInstance()->loadClasses(sprintf("inc/classes/%s/", $className));
        } catch (PathIsNoDirectoryException $e) {
-               ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <strong>%s</strong> for the follwing reason: <strong>%s</strong>",
+               ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
                        $className
                ));
        } catch (PathIsEmptyException $e) {
-               ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <strong>%s</strong> for the follwing reason: <strong>%s</strong>",
+               ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
                        $className
                ));
        } catch (PathReadProtectedException $e) {
-               ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <strong>%s</strong> for the follwing reason: <strong>%s</strong>",
+               ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
                        $className
                ));
        } catch (DirPointerNotOpenedException $e) {
-               ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <strong>%s</strong> for the follwing reason: <strong>%s</strong>",
+               ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
                        $className
                ));
        }
index 3f6df30..addebdb 100644 (file)
@@ -31,7 +31,7 @@ class InvalidActionException extends FrameworkException {
         */
        public function __construct(array $msgArray, $code) {
                // Prepare the message
-               $message = sprintf("[%s:%d] Cannot resolve action <span id=\"exception_reason\">%s</span>.",
+               $message = sprintf("[%s:%d] Cannot resolve action <span class=\"exception_reason\">%s</span>.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]
index a5ab08b..a07bf45 100644 (file)
@@ -31,7 +31,7 @@ class UserAuthorizationException extends FrameworkException {
         */
        public function __construct(Filterable $filterInstance, $code) {
                // Construct the message
-               $message = sprintf("[%s:%d] Authorization has failed. Error code <span id=\"exception_reason\">%s</span>",
+               $message = sprintf("[%s:%d] Authorization has failed. Error code <span class=\"exception_reason\">%s</span>",
                        $filterInstance->__toString(),
                        $this->getLine(),
                        $this->getHexCode($code)
index 3ba2fbe..267744c 100644 (file)
@@ -121,7 +121,7 @@ abstract class FrameworkException extends ReflectionException {
                        } // END - if
 
                        // Prepare argument infos
-                       $info = "<em id=\"debug_args\">{$info}</em>";
+                       $info = "<em id=\"debug_args_".$dbgIndex."\">{$info}</em>";
 
                        // File detection
                        $file = "Unknown file";
@@ -136,7 +136,7 @@ abstract class FrameworkException extends ReflectionException {
                        } // END - if
 
                        // The message
-                       $dbgMsg .= "\t at <em id=\"debug_id\">".$dbgIndex."</em> <em id=\"debug_file\">".$file."</em> (<em id=\"debug_line\">".$line."</em>) -&gt; ".$dbgInfo['function']."(".$info.")<br />\n";
+                       $dbgMsg .= "\t at <em id=\"debug_id_".$dbgIndex."\">".$dbgIndex."</em> <em id=\"debug_file_".$dbgIndex."\">".$file."</em> (<em id=\"debug_line_".$dbgIndex."\">".$line."</em>) -&gt; ".$dbgInfo['function']."(".$info.")<br />\n";
                } // END - if
                $dbgMsg .= "Debug backtrace end<br />\n";
 
index 1d0acb4..dfba485 100644 (file)
@@ -31,7 +31,7 @@ class MismatchingCompressorsException extends FrameworkException {
         */
        public function __construct (array $array, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Der Kompressor <span id=\"exception_reason\">%s</span> zu den geladenen Daten aus <span id=\"exception_reason\">%s</span> und der aktuell verwendete Kompressor <span id=\"exception_reason\">%s</span> stimmen nicht &uuml;berein!",
+               $message = sprintf("[%s:%d] Der Kompressor <span class=\"exception_reason\">%s</span> zu den geladenen Daten aus <span class=\"exception_reason\">%s</span> und der aktuell verwendete Kompressor <span class=\"exception_reason\">%s</span> stimmen nicht &uuml;berein!",
                        $array[0]->__toString(),
                        $this->getLine(),
                        strtoupper($array[1]),
index b166455..7fec632 100644 (file)
@@ -31,7 +31,7 @@ class InvalidControllerException extends FrameworkException {
         */
        public function __construct(array $msgArray, $code) {
                // Prepare the message
-               $message = sprintf("[%s:%d] Cannot resolve controller <span id=\"exception_reason\">%s (class name: %s)</span>.",
+               $message = sprintf("[%s:%d] Cannot resolve controller <span class=\"exception_reason\">%s (class name: %s)</span>.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1],
index 6270e9c..0634928 100644 (file)
@@ -31,7 +31,7 @@ class SqlException extends DatabaseException {
         */
        public function __construct (array $msgArray, $code) {
                // Construct the message
-               $message = sprintf("[%s:%d] SQL error detected. Message from database: <span id=\"exception_reason\">%s</span>, code: <span id=\"exception_reason\">%s</span>.",
+               $message = sprintf("[%s:%d] SQL error detected. Message from database: <span class=\"exception_reason\">%s</span>, code: <span class=\"exception_reason\">%s</span>.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1],
index a8fb42b..b14fa97 100644 (file)
@@ -31,7 +31,7 @@ class SavePathIsNoDirectoryException extends DatabaseException {
         */
        public function __construct ($path, $code) {
                // Add a message around the missing class
-               $message = sprintf("Der angegebene Speicherpfad <span id=\"exception_reason\">%s</span> ist ung&uuml;tig (kein Pfad).", $path);
+               $message = sprintf("Der angegebene Speicherpfad <span class=\"exception_reason\">%s</span> ist ung&uuml;tig (kein Pfad).", $path);
 
                // Call parent constructor
                parent::__construct($message, $code);
index 7a0534b..ce0ffa6 100644 (file)
@@ -31,7 +31,7 @@ class SavePathReadProtectedException extends DatabaseException {
         */
        public function __construct ($path, $code) {
                // Add a message around the missing class
-               $message = sprintf("Der Pfad <span id=\"exception_reason\">%s</span> ist lese-gesch&uuml;tzt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path);
+               $message = sprintf("Der Pfad <span class=\"exception_reason\">%s</span> ist lese-gesch&uuml;tzt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path);
 
                // Call parent constructor
                parent::__construct($message, $code);
index 9d7f699..81a1067 100644 (file)
@@ -31,7 +31,7 @@ class SavePathWriteProtectedException extends DatabaseException {
         */
        public function __construct ($path, $code) {
                // Add a message around the missing class
-               $message = sprintf("Der angegebene Speicherpfad <span id=\"exception_reason\">%s</span> ist schreibgesch&uuml;tzt. Bitte Zugriffsrechte (CHMOD) entsprechend setzen.", $path);
+               $message = sprintf("Der angegebene Speicherpfad <span class=\"exception_reason\">%s</span> ist schreibgesch&uuml;tzt. Bitte Zugriffsrechte (CHMOD) entsprechend setzen.", $path);
 
                // Call parent constructor
                parent::__construct($message, $code);
index bf3aa4c..0422552 100644 (file)
@@ -31,7 +31,7 @@ class WrapperUserNameNotFoundException extends DatabaseException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Username <span id=\"exception_reason\">%s</span> was not found. Requesting class: <span id=\"exception_reason\">%s</span>",
+               $message = sprintf("[%s:%d] Username <span class=\"exception_reason\">%s</span> was not found. Requesting class: <span class=\"exception_reason\">%s</span>",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]->getUserName(),
index 59a52ad..9978e5e 100644 (file)
@@ -32,7 +32,7 @@ class FormClosedException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Could not add form element <span id=\"exception_reason\">%s</span> because form is closed.",
+               $message = sprintf("[%s:%d] Could not add form element <span class=\"exception_reason\">%s</span> because form is closed.",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index a1e8802..92a6e43 100644 (file)
@@ -31,7 +31,7 @@ class FormGroupClosedException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Could not add sub group <span id=\"exception_reason\">%s</span> because no form group has been opened before.",
+               $message = sprintf("[%s:%d] Could not add sub group <span class=\"exception_reason\">%s</span> because no form group has been opened before.",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index 6c257c0..b6b78f6 100644 (file)
@@ -31,7 +31,7 @@ class HelperNoPreviousOpenedSubGroupException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Sub group not opened before. Raw text follows: <span id=\"exception_reason\">%s</span>",
+               $message = sprintf("[%s:%d] Sub group not opened before. Raw text follows: <span class=\"exception_reason\">%s</span>",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]
index c650070..2946a8b 100644 (file)
@@ -31,7 +31,7 @@ class NoGroupOpenedException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Group not opened before. Raw text follows: <span id=\"exception_reason\">%s</span>",
+               $message = sprintf("[%s:%d] Group not opened before. Raw text follows: <span class=\"exception_reason\">%s</span>",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]
index e68e8f0..218968b 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>Manageable(User|Guest)</u>.",
+               $message = sprintf("[%s:%d] Registry key <span class=\"exception_reason\">%s</span> does not include a class with implemented interface <u>Manageable(User|Guest)</u>.",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index 6dc16a4..5b0293e 100644 (file)
@@ -31,7 +31,7 @@ class DirPointerNotOpenedException extends FrameworkException {
         */
        public function __construct ($path, $code) {
                // Add a message around the missing class
-               $message = sprintf("F&uuml;r den Pfad <span id=\"exception_reason\">%s</span> konnte kein Pointer initialisiert werden.", $path);
+               $message = sprintf("F&uuml;r den Pfad <span class=\"exception_reason\">%s</span> konnte kein Pointer initialisiert werden.", $path);
 
                // Call parent constructor
                parent::__construct($message, $code);
index a071944..e2e7dbc 100644 (file)
@@ -31,7 +31,7 @@ class FileNotFoundException extends FrameworkException {
         */
        public function __construct ($fqfn, $code) {
                // Add a message around the missing class
-               $message = sprintf("The requested file <span id=\"exception_reason\">%s</span> was not found.",
+               $message = sprintf("The requested file <span class=\"exception_reason\">%s</span> was not found.",
                        $fqfn
                );
 
index e7e8bde..37300a5 100644 (file)
@@ -31,7 +31,7 @@ class FilePointerNotOpenedException extends FrameworkException {
         */
        public function __construct ($fqfn, $code) {
                // Add a message around the missing class
-               $message = sprintf("Not able to initialize a pointer for the file <span id=\"exception_reason\">%s</span>. Maybe the file is missing.", $fqfn);
+               $message = sprintf("Not able to initialize a pointer for the file <span class=\"exception_reason\">%s</span>. Maybe the file is missing.", $fqfn);
 
                // Call parent constructor
                parent::__construct($message, $code);
index f68aebe..4e8a0e6 100644 (file)
@@ -31,7 +31,7 @@ class FileReadProtectedException extends FrameworkException {
         */
        public function __construct ($fileName, $code) {
                // Add a message around the missing class
-               $message = sprintf("File <span id=\"exception_reason\">%s</span> is read-protected. Please set read access rights (CHMOD).", $fileName);
+               $message = sprintf("File <span class=\"exception_reason\">%s</span> is read-protected. Please set read access rights (CHMOD).", $fileName);
 
                // Call parent constructor
                parent::__construct($message, $code);
index 47fd5fb..a1ef85a 100644 (file)
@@ -31,7 +31,7 @@ class InvalidDataLengthException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Eine unerwartete Datenl&auml;nge von <span id=\"exception_reason\">%s</span> Byte ist aufgetreten. <span id=\"exception_reason\">%s</span> wurden erwartet!",
+               $message = sprintf("[%s:%d] Eine unerwartete Datenl&auml;nge von <span class=\"exception_reason\">%s</span> Byte ist aufgetreten. <span class=\"exception_reason\">%s</span> wurden erwartet!",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1],
index 26a1270..2e5104a 100644 (file)
@@ -31,7 +31,7 @@ class InvalidMD5ChecksumException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Die MD5-Pr&uuml;fsummen <span id=\"exception_reason\">%s</span> und <span id=\"exception_reason\">%s</span> stimmen nicht &uuml;berein!",
+               $message = sprintf("[%s:%d] Die MD5-Pr&uuml;fsummen <span class=\"exception_reason\">%s</span> und <span class=\"exception_reason\">%s</span> stimmen nicht &uuml;berein!",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1],
index 51222eb..7f908b1 100644 (file)
@@ -31,7 +31,7 @@ class PathIsNoDirectoryException extends FrameworkException {
         */
        public function __construct ($path, $code) {
                // Add a message around the missing class
-               $message = sprintf("Der angegebene Pfad <span id=\"exception_reason\">%s</span> ist ung&uuml;tig (kein Pfad).", $path);
+               $message = sprintf("Der angegebene Pfad <span class=\"exception_reason\">%s</span> ist ung&uuml;tig (kein Pfad).", $path);
 
                // Call parent constructor
                parent::__construct($message, $code);
index 09fed2b..b5dd935 100644 (file)
@@ -31,7 +31,7 @@ class PathReadProtectedException extends FrameworkException {
         */
        public function __construct ($path, $code) {
                // Add a message around the missing class
-               $message = sprintf("Der Pfad <span id=\"exception_reason\">%s</span> ist lese-gesch&uuml;tzt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path);
+               $message = sprintf("Der Pfad <span class=\"exception_reason\">%s</span> ist lese-gesch&uuml;tzt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path);
 
                // Call parent constructor
                parent::__construct($message, $code);
index 9265b33..19be0cd 100644 (file)
@@ -31,7 +31,7 @@ class InvalidLanguagePathStringException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] <span id=\"exception_reason\">%s</span> is not a string with path!",
+               $message = sprintf("[%s:%d] <span class=\"exception_reason\">%s</span> is not a string with path!",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index 858e737..b17823d 100644 (file)
@@ -31,7 +31,7 @@ class LanguagePathIsNoDirectoryException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Der Sprach-Basispfad <span id=\"exception_reason\">%s</span> existiert nicht oder ist eine Datei!",
+               $message = sprintf("[%s:%d] Der Sprach-Basispfad <span class=\"exception_reason\">%s</span> existiert nicht oder ist eine Datei!",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index 2fc7866..0938f77 100644 (file)
@@ -31,7 +31,7 @@ class LanguagePathReadProtectedException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Base language path <span id=\"exception_reason\">%s</span> is read-protected. Please change access rights (CHMOD).",
+               $message = sprintf("[%s:%d] Base language path <span class=\"exception_reason\">%s</span> is read-protected. Please change access rights (CHMOD).",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index 32499e3..51497b4 100644 (file)
@@ -31,7 +31,7 @@ class ClassMismatchException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("The class <span id=\"exception_reason\">%s</span> does not match class <span id=\"exception_reason\">%s</span>.",
+               $message = sprintf("The class <span class=\"exception_reason\">%s</span> does not match class <span class=\"exception_reason\">%s</span>.",
                        $classArray[0],
                        $classArray[1]
                );
index 29f13f2..1dcf9bd 100644 (file)
@@ -31,7 +31,7 @@ class ClassNotFoundException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Internal class <span id=\"exception_reason\">%s</span> not found.",
+               $message = sprintf("[%s:%d] Internal class <span class=\"exception_reason\">%s</span> not found.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]
index e4ec1b7..40c3c71 100644 (file)
@@ -31,7 +31,7 @@ class ConfigEntryNotFoundException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Configuration entry <span id=\"exception_reason\">%s</span> not found.",
+               $message = sprintf("[%s:%d] Configuration entry <span class=\"exception_reason\">%s</span> not found.",
                        $classArray[0],
                        $this->getLine(),
                        $classArray[1]
index 7806f9b..1e11cce 100644 (file)
@@ -38,7 +38,7 @@ class DimNotFoundInArrayException extends FrameworkException {
                        );
                } else {
                        // No class given
-                       $message = sprintf("Please provide a class for <span id=\"exception_reason\">%s</span>", __CLASS__);
+                       $message = sprintf("Please provide a class for <span class=\"exception_reason\">%s</span>", __CLASS__);
                }
 
                // Call parent constructor
index 1fae654..188969c 100644 (file)
@@ -31,7 +31,7 @@ class EmptyVariableException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Variable <span id=\"exception_reason\">%s</span> is not set.",
+               $message = sprintf("[%s:%d] Variable <span class=\"exception_reason\">%s</span> is not set.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]
index d3b37c8..81ff4f1 100644 (file)
@@ -31,7 +31,7 @@ class ExceptionNotFoundException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Exception <span id=\"exception_reason\">%s</span> not found.",
+               $message = sprintf("[%s:%d] Exception <span class=\"exception_reason\">%s</span> not found.",
                        $classArray[0],
                        $this->getLine(),
                        $classArray[1]
index 5291b05..a632dcd 100644 (file)
@@ -34,7 +34,7 @@ class GetterNotFoundException extends FrameworkException {
                $dataArray = (array) $dataArray;
 
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Getter-Methode f&uuml;r Attribut <span id=\"exception_reason\">%s</span> nicht gefunden.",
+               $message = sprintf("[%s:%d] Getter-Methode f&uuml;r Attribut <span class=\"exception_reason\">%s</span> nicht gefunden.",
                        $dataArray[0]->__toString(),
                        $this->getLine(),
                        $dataArray[1]
index a85bebf..3703f1a 100644 (file)
@@ -31,7 +31,7 @@ class InvalidArrayCountException extends FrameworkException {
         */
        public function __construct (array $array, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] <span id=\"exception_reason\">%s</span> hat <u>%d</u> Elemente, soll aber <u>%d</u> enthalten!",
+               $message = sprintf("[%s:%d] <span class=\"exception_reason\">%s</span> hat <u>%d</u> Elemente, soll aber <u>%d</u> enthalten!",
                        $array[0]->__toString(),
                        $this->getLine(),
                        $array[1],
index d546cc1..d55a167 100644 (file)
@@ -31,7 +31,7 @@ class InvalidCommandException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Invalid command <span id=\"exception_reason\">%s (class %s)</span> detected.",
+               $message = sprintf("[%s:%d] Invalid command <span class=\"exception_reason\">%s (class %s)</span> detected.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1],
index 93cc03a..34a4d24 100644 (file)
@@ -31,7 +31,7 @@ class InvalidCommandInstanceException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Invalid command <span id=\"exception_reason\">%s</span> detected.",
+               $message = sprintf("[%s:%d] Invalid command <span class=\"exception_reason\">%s</span> detected.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]
index a7fc71e..c628542 100644 (file)
@@ -31,7 +31,7 @@ class InvalidInterfaceException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Object does not implement expected interface <span id=\"exception_reason\">.",
+               $message = sprintf("[%s:%d] Object does not implement expected interface <span class=\"exception_reason\">.",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index a59b514..5c3547b 100644 (file)
@@ -41,7 +41,7 @@ class MissingArrayElementsException extends FrameworkException {
                }
 
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Array <u>%s()</u> Does not have these elements: <span id=\"exception_reason\">%s</span>",
+               $message = sprintf("[%s:%d] Array <u>%s()</u> Does not have these elements: <span class=\"exception_reason\">%s</span>",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1],
index 36dcbba..e9f00de 100644 (file)
@@ -31,7 +31,7 @@ class NoArrayCreatedException extends FrameworkException {
         */
        public function __construct (array $array, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] <span id=\"exception_reason\">%s</span> ist kein erstelltes Objekt.",
+               $message = sprintf("[%s:%d] <span class=\"exception_reason\">%s</span> ist kein erstelltes Objekt.",
                        $array[0]->__toString(),
                        $this->getLine(),
                        $array[1]
index 2f0c557..30d312f 100644 (file)
@@ -29,7 +29,7 @@ class NoArrayException extends FrameworkException {
         */
        public function __construct ($string, $code) {
                // Add a message around the missing class
-               $message = sprintf("<span id=\"exception_reason\">%s</span> ist kein Array!",
+               $message = sprintf("<span class=\"exception_reason\">%s</span> ist kein Array!",
                        $string
                );
 
index 20f6870..541b849 100644 (file)
@@ -33,7 +33,7 @@ class NoObjectException extends FrameworkException {
         */
        public function __construct ($string, $code) {
                // Add a message around the missing class
-               $message = sprintf("<span id=\"exception_reason\">%s</span> ist kein Objekt!",
+               $message = sprintf("<span class=\"exception_reason\">%s</span> ist kein Objekt!",
                        $string
                );
 
index 57000be..ddcad58 100644 (file)
@@ -31,7 +31,7 @@ class VariableIsNotSetException extends FrameworkException {
         */
        public function __construct (array $array, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Bei der Initialisierung der Applikation <span id=\"exception_reason\">%s</span> wurde keine Variable <span id=\"exception_reason\">%s</span> erzeugt.",
+               $message = sprintf("[%s:%d] Bei der Initialisierung der Applikation <span class=\"exception_reason\">%s</span> wurde keine Variable <span class=\"exception_reason\">%s</span> erzeugt.",
                        $array[0]->__toString(),
                        $this->getLine(),
                        $array[1],
index be1ab5d..762eb82 100644 (file)
@@ -31,7 +31,7 @@ class InvalidDatabaseResultException extends FrameworkException {
         */
        public function __construct(array $msgArray, $code) {
                // Construct the message
-               $message = sprintf("[%s:%d] Database instance <span id=\"exception_reason\">%s</span> contains invalid entries.",
+               $message = sprintf("[%s:%d] Database instance <span class=\"exception_reason\">%s</span> contains invalid entries.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]->__toString()
index 5a109fb..04d510a 100644 (file)
@@ -31,7 +31,7 @@ class BasePathIsNoDirectoryException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Der Template-Basispfad <span id=\"exception_reason\">%s</span> existiert nicht oder ist eine Datei!",
+               $message = sprintf("[%s:%d] Der Template-Basispfad <span class=\"exception_reason\">%s</span> existiert nicht oder ist eine Datei!",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index c66fd7b..6a4d956 100644 (file)
@@ -31,7 +31,7 @@ class BasePathReadProtectedException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Der Template-Basispfad <span id=\"exception_reason\">%s</span> ist lesegesch&uuml;tzt! Bitte Zugriffsrechte (CHMOD) &auml;ndern.",
+               $message = sprintf("[%s:%d] Der Template-Basispfad <span class=\"exception_reason\">%s</span> ist lesegesch&uuml;tzt! Bitte Zugriffsrechte (CHMOD) &auml;ndern.",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index c52a584..93f875e 100644 (file)
@@ -31,7 +31,7 @@ class InvalidBasePathStringException extends FrameworkException {
         */
        public function __construct (array $classArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] <span id=\"exception_reason\">%s</span> is not a string with a base path!",
+               $message = sprintf("[%s:%d] <span class=\"exception_reason\">%s</span> is not a string with a base path!",
                        $classArray[0]->__toString(),
                        $this->getLine(),
                        $classArray[1]
index 9a7eb05..9394348 100644 (file)
@@ -31,7 +31,7 @@ class UnexpectedTemplateTypeException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Der Template-Typ <span id=\"exception_reason\">%s</span> entspricht nicht dem erwartetem Template-Typ <span id=\"exception_reason\">%s</span>.",
+               $message = sprintf("[%s:%d] Der Template-Typ <span class=\"exception_reason\">%s</span> entspricht nicht dem erwartetem Template-Typ <span class=\"exception_reason\">%s</span>.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1],
index 0af17cd..06dea77 100644 (file)
@@ -31,7 +31,7 @@ class ViewHelperNotFoundException extends FrameworkException {
         */
        public function __construct (array $msgArray, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:] View-Helper <span id=\"exception_reason\">%s</span> ist ung&uuml;ltig.",
+               $message = sprintf("[%s:] View-Helper <span class=\"exception_reason\">%s</span> ist ung&uuml;ltig.",
                        $msgArray[0]->__toString(),
                        $msgArray[1]
                );
index 27dbf51..dcef370 100644 (file)
@@ -31,7 +31,7 @@ class UserEmailMissingException extends FrameworkException {
         */
        public function __construct(array $msgArray, $code = 0) {
                // Create the message
-               $message = sprintf("[%s:%d] User email <span id=\"exception_reason\">%s</span> was not found.",
+               $message = sprintf("[%s:%d] User email <span class=\"exception_reason\">%s</span> was not found.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]
index a5184b3..0457930 100644 (file)
@@ -31,7 +31,7 @@ class UserPasswordMismatchException extends FrameworkException {
         */
        public function __construct(array $msgArray, $code = 0) {
                // Create the message
-               $message = sprintf("[%s:%d] Supplied password for user <span id=\"exception_reason\">%s</span> did not match with stored password.",
+               $message = sprintf("[%s:%d] Supplied password for user <span class=\"exception_reason\">%s</span> did not match with stored password.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]->getUserName()
index 0ab7e9e..9f5e52d 100644 (file)
@@ -31,7 +31,7 @@ class UsernameMissingException extends FrameworkException {
         */
        public function __construct(array $msgArray, $code = 0) {
                // Create the message
-               $message = sprintf("[%s:%d] Username <span id=\"exception_reason\">%s</span> was not found.",
+               $message = sprintf("[%s:%d] Username <span class=\"exception_reason\">%s</span> was not found.",
                        $msgArray[0]->__toString(),
                        $this->getLine(),
                        $msgArray[1]
diff --git a/inc/classes/interfaces/discovery/.htaccess b/inc/classes/interfaces/discovery/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/discovery/class_Discoverable.php b/inc/classes/interfaces/discovery/class_Discoverable.php
new file mode 100644 (file)
index 0000000..4aa69e8
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/**
+ * An interface for discovery
+ *
+ * @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 Discoverable extends FrameworkInterface {
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       function discover (Requestable $requestInstance);
+
+       /**
+        * Adds the database result in a human-readable format to the helper class
+        *
+        * @param       $helperInstance         An instance of a helper class
+        * @return      void
+        */
+       function addResultsToHelper (HelpableTemplate $helperInstance);
+}
+
+//
+?>
index 3ed47c0..a7de7e8 100644 (file)
@@ -69,7 +69,7 @@ class WebLoginProfileAction extends BaseAction implements Commandable, Registera
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add user status filter here
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
        }
 }
 
index 7e461ac..31fecee 100644 (file)
@@ -211,7 +211,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        $this->setRealClass('DestructedObject');
                } elseif ((defined('DEBUG_DESTRUCTOR')) && (is_object($this->getDebugInstance()))) {
                        // Already destructed object
-                       $this->debugOutput(sprintf("[%s:] The object <strong>%s</strong> is already destroyed.",
+                       $this->debugOutput(sprintf("[%s:] The object <span class=\"object_name\">%s</span> is already destroyed.",
                                __CLASS__, $this->__toString()
                        ));
                }
@@ -269,6 +269,9 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        private final function initInstance () {
                // Is this a system class?
                if (!in_array($this->__toString(), $this->systemClasses)) {
+                       // Set configuration instance
+                       $this->setConfigInstance(FrameworkConfiguration::getInstance());
+
                        // Add application helper to our class
                        $this->systemclasses[] = $this->getConfigInstance()->readConfig('app_helper_class');
 
@@ -289,7 +292,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        Registry::isInitialized('OK');
                } elseif ($this->__toString() == 'DebugMiddleware') {
                        // Set configuration instance
-                       $this->setConfigInstance(FrameworkConfiguration::createFrameworkConfiguration());
+                       $this->setConfigInstance(FrameworkConfiguration::getInstance());
                }
        }
 
@@ -571,6 +574,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * Stub method (only real cabins shall override it)
         *
         * @return      boolean false = is no cabin, true = is a cabin
+        * @deprecated
         */
        public function isCabin () {
                return false;
@@ -581,6 +585,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         *
         * @return      boolean false = is not tradeable by the Merchant class,
         *                                      true  = is a tradeable object
+        * @deprecated
         */
        public function isTradeable () {
                return false;
@@ -759,7 +764,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                );
 
                // Output it
-               ApplicationEntryPoint::app_die(sprintf("<strong>%s debug output:</strong><div id=\"debug_content\">%s</div>\nLoaded includes: <div id=\"debug_include_list\">%s</div>",
+               ApplicationEntryPoint::app_die(sprintf("<div class=\"debug_header\">%s debug output:</div><div class=\"debug_content\">%s</div>\nLoaded includes: <div class=\"debug_include_list\">%s</div>",
                        $this->__toString(),
                        $content,
                        ClassLoader::getInstance()->getPrintableIncludeList()
@@ -810,9 +815,9 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        public function debugBackTrace () {
                // Sorry, there is no other way getting this nice backtrace
-               print "<pre>\n";
+               print("<pre>\n");
                debug_print_backtrace();
-               print "</pre>";
+               print("</pre>");
                exit;
        }
 
index c6ba2a6..596bf89 100644 (file)
@@ -134,7 +134,7 @@ class WebResendLinkCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Filter for checking if account is unconfirmed
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter'));
        }
 }
 
index 3b49f72..d037d40 100644 (file)
@@ -50,7 +50,7 @@ class ConsoleTools extends BaseFrameworkSystem {
 
                        // Read the file
                        $hostname = trim($io->readFromFile());
-                       $helper->debugOutput(sprintf("[%s:] Our host name is: <strong>%s</strong>",
+                       $helper->debugOutput(sprintf("[%s:] Our host name is: <span class=\"data\">%s</span>",
                                $helper->__toString(),
                                $hostname
                        ));
@@ -65,7 +65,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                                $ip = $ipResolved;
 
                                // Debug message
-                               $helper->debugOutput(sprintf("[%s:] Resolved IP address is: <strong>%s</strong>\n",
+                               $helper->debugOutput(sprintf("[%s:] Resolved IP address is: <span class=\"data\">%s</span>\n",
                                        $helper->__toString(),
                                        $ip
                                ));
index e84fca7..a671745 100644 (file)
@@ -46,7 +46,7 @@ class ImageCodeCaptchaController extends BaseController implements Controller {
                $controllerInstance->setResolverInstance($resolverInstance);
 
                // Add filter for checking the "encrypt" string
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_encrypt_validator_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_encrypt_validator_filter'));
 
                // Return the prepared instance
                return $controllerInstance;
index 1c4d442..69fa4d1 100644 (file)
  */
 class BaseController extends BaseFrameworkSystem implements Registerable {
        /**
-        * Pre filter chain instance
+        * Generic filter chains
         */
-       private $preFilterChain = null;
-
-       /**
-        * Post filter chain instance
-        */
-       private $postFilterChain = null;
+       private $filterChains = array();
 
        /**
         * Protected constructor
@@ -49,14 +44,24 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
                $this->removeSystemArray();
 
                // Initialize both filter chains
-               $this->preFilterChain  = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
-               $this->postFilterChain = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
+               $this->initFilterChain('pre');
+               $this->initFilterChain('post');
 
                // Add this controller to the registry
                Registry::getRegistry()->addInstance('controller', $this);
        }
 
        /**
+        * Private method to initialize a given filter chain
+        *
+        * @param       $filterChain    Name of the filter chain
+        * @return      void
+        */
+       private function initFilterChain ($filterChain) {
+               $this->filterChains[$filterChain] = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
+       }
+
+       /**
         * Adds a filter to the pre filter chain
         *
         * @param       $filterInstance         An instance of a filter
@@ -64,7 +69,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        public function addPreFilter (Filterable $filterInstance) {
                // Add the pre filter
-               $this->preFilterChain->addFilter($filterInstance);
+               $this->filterChains['pre']->addFilter($filterInstance);
        }
 
        /**
@@ -75,7 +80,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        public function addPostFilter (Filterable $filterInstance) {
                // Add the post filter
-               $this->postFilterChain->addFilter($filterInstance);
+               $this->filterChains['post']->addFilter($filterInstance);
        }
 
        /**
@@ -87,7 +92,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        protected function executePreFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute all pre filters
-               $this->preFilterChain->processFilters($requestInstance, $responseInstance);
+               $this->filterChains['pre']->processFilters($requestInstance, $responseInstance);
        }
 
        /**
@@ -99,7 +104,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        protected function executePostFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute all post filters
-               $this->postFilterChain->processFilters($requestInstance, $responseInstance);
+               $this->filterChains['post']->processFilters($requestInstance, $responseInstance);
        }
 }
 
index 1a1900c..4e82ce1 100644 (file)
@@ -46,16 +46,16 @@ class WebLoginAreaController extends BaseController implements Controller {
                $controllerInstance->setResolverInstance($resolverInstance);
 
                // User auth filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
 
                // User update filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter'));
 
                // News fetcher filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter'));
 
                // News proccess/display-preparation
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter'));
 
                /* @todo: Add some filters to this controller */
 
index 64c845d..411c59b 100644 (file)
@@ -47,10 +47,10 @@ class WebConfirmController extends BaseController implements Controller {
                $controllerInstance->setResolverInstance($resolverInstance);
 
                // Add filters for handling confirmation code and username
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_class'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_class'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('confirm_code_verifier_class'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_confirmed_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('confirm_code_verifier_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_confirmed_filter'));
 
                // Return the prepared instance
                return $controllerInstance;
index 1f6c0cc..d5769e9 100644 (file)
@@ -46,8 +46,8 @@ class WebDefaultNewsController extends BaseController implements Controller {
                $controllerInstance->setResolverInstance($resolverInstance);
 
                // Add news filters to this controller
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_class'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter'));
 
                // Return the prepared instance
                return $controllerInstance;
index 00b020a..7d8a9ae 100644 (file)
@@ -47,10 +47,10 @@ class WebLogoutController extends BaseController implements Controller {
                $controllerInstance->setResolverInstance($resolverInstance);
 
                // Add user auth filter (we don't need an update of the user here because it will be redirected)
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
 
                // User status filter
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter'));
 
                // Return the prepared instance
                return $controllerInstance;
diff --git a/inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php b/inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php
new file mode 100644 (file)
index 0000000..52f3646
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+/**
+ * A database wrapper for payments
+ *
+ * @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 PaymentsDatabaseWrapper extends BaseDatabaseWrapper {
+       // Constants for exceptions
+       const EXCEPTION_CLIENT_USERNAME_NOT_FOUND = 0x180;
+
+       // Constants for database table names
+       const DB_TABLE_PAYMENTS = "payments";
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct() {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database wrapper by a provided user class
+        *
+        * @return      $wrapperInstance        An instance of the created wrapper class
+        */
+       public final static function createPaymentsDatabaseWrapper () {
+               // Get a new instance
+               $wrapperInstance = new PaymentsDatabaseWrapper();
+
+               // Set (primary!) table name
+               $wrapperInstance->setTableName(self::DB_TABLE_PAYMENTS);
+
+               // Return the instance
+               return $wrapperInstance;
+       }
+}
+
+// [EOF]
+?>
index b9db256..08e6d42 100644 (file)
@@ -52,7 +52,7 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output
         * @return      void
         */
        public final function outputStream ($output) {
-               print(html_entity_decode(strip_tags($output)));
+               print(html_entity_decode(strip_tags(stripslashes($output))));
        }
 
        /**
index 268738a..433f68e 100644 (file)
@@ -54,7 +54,7 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStre
        public final function outputStream ($output) {
                // Strip out <br />
                $output = str_replace("<br />", "", $output);
-               print($output."<br />\n");
+               print(stripslashes($output)."<br />\n");
        }
 
        /**
diff --git a/inc/classes/main/discovery/.htaccess b/inc/classes/main/discovery/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/discovery/class_ b/inc/classes/main/discovery/class_
new file mode 100644 (file)
index 0000000..890d650
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+/**
+ * A local payment discovery class. This class looks in local database for
+ * registered payment types and like all the others it at least returns the
+ * money bank transfer type.
+ *
+ * @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 ???Discovery extends BaseDiscovery implements Discoverable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public final static function create???Discovery () {
+               // Get an instance of this class
+               $discoveryInstance = new ???Discovery();
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        * @todo        0% done
+        */
+       public function discover (Requestable $requestInstance) {
+               $this->partialStub("Please implement this method.");
+       }
+
+       /**
+        * Adds the database result in a human-readable format to the helper class
+        *
+        * @param       $helperInstance         An instance of a helper class
+        * @return      void
+        * @todo        0% done
+        */
+       public function addResultsToHelper (HelpableTemplate $helperInstance) {
+               $this->partialStub("Please implement this method.");
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/discovery/class_BaseDiscovery.php b/inc/classes/main/discovery/class_BaseDiscovery.php
new file mode 100644 (file)
index 0000000..48164e1
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+ * A general discovery class
+ *
+ * @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 BaseDiscovery extends BaseFrameworkSystem {
+       /**
+        * Action name for payment discovery
+        */
+       private $actionName = "";
+
+       /**
+        * 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();
+       }
+
+       /**
+        * Protected setter for action name
+        *
+        * @param       $actionName             Action name to set
+        * @return      void
+        */
+       protected final function setActionName ($actionName) {
+               $this->actionName = (string) $actionName;
+       }
+
+       /**
+        * Private getter for action name
+        *
+        * @return      $actionName             Action name to set
+        */
+       protected final function getActionName () {
+               return $this->actionName;
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/discovery/payment/.htaccess b/inc/classes/main/discovery/payment/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php b/inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php
new file mode 100644 (file)
index 0000000..129dd3b
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/**
+ * A local payment discovery class. This class looks in local database for
+ * registered payment types and like all the others it at least returns the
+ * money bank transfer type.
+ *
+ * @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 LocalPaymentDiscovery extends BaseDiscovery implements Discoverable, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @param       $filterInstance         An instance of a filter
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public final static function createLocalPaymentDiscovery (Filterable $filterInstance) {
+               // Get an instance of this class
+               $discoveryInstance = new LocalPaymentDiscovery();
+
+               // Set the action from filter
+               $discoveryInstance->setActionName($filterInstance->getActionName());
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       public function discover (Requestable $requestInstance) {
+               // Now get a search criteria and set app name and payment action as search critera
+               $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+               $criteriaInstance->addCriteria("app_name", $requestInstance->getRequestElement('app'));
+               $criteriaInstance->addCriteria("payment_action", $this->getActionName().'_action');
+               $criteriaInstance->setLimit(1);
+
+               // Get a wrapper instance
+               $wrapperInstance = ObjectFactory::createObjectByConfiguredName('payment_db_wrapper_class');
+
+               // Get result back
+               $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
+
+               // Set the result instance
+               $this->setResultInstance($resultInstance);
+       }
+
+       /**
+        * Adds the database result in a human-readable format to the helper class
+        *
+        * @param       $helperInstance         An instance of a helper class
+        * @return      void
+        * @todo        0% done
+        */
+       public function addResultsToHelper (HelpableTemplate $helperInstance) {
+               // Undone part
+       }
+}
+
+// [EOF]
+?>
index 06c73d8..0848e79 100644 (file)
@@ -64,14 +64,13 @@ class ObjectFactory extends BaseFactory {
                        throw new ClassNotFoundException(array($factoryInstance, $className), self::EXCEPTION_CLASS_NOT_FOUND);
                }
 
-               // Then Prepare the call-back function
-               $callback = sprintf("%s::create%s",
-                       $className,
+               // Create method name
+               $methodName = sprintf("create%s",
                        $className
                );
 
                // Run the user function
-               $objectInstance = call_user_func_array($callback, $args);
+               $objectInstance = call_user_func_array(array($className, $methodName), $args);
 
                // Count generated objects up
                self::$total++;
diff --git a/inc/classes/main/filter/payment/.htaccess b/inc/classes/main/filter/payment/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php b/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php
new file mode 100644 (file)
index 0000000..2f12e5b
--- /dev/null
@@ -0,0 +1,139 @@
+<?php
+/**
+ * A filter for payment discovery. This class discovers the payment type and
+ * returns an object holding all available payment system for the requested
+ * type.
+ *
+ * @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 PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
+       /**
+        * Action name for payment discovery
+        */
+       private $actionName = "";
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @param       $actionInstance         A performable action
+        * @return      $filterInstance         An instance of this filter class
+        * @throws      NullPointerException    If the resolver is not set
+        */
+       public final static function createPaymentDiscoveryFilter (PerformableAction $actionInstance) {
+               // Get a new instance
+               $filterInstance = new PaymentDiscoveryFilter();
+
+               // Get resolver from action
+               $resolverInstance = $actionInstance->getResolverInstance();
+
+               // Is the resolver set?
+               if (is_null($resolverInstance)) {
+                       // Throw an exception here
+                       throw new NullPointerException($filterInstance, self::EXCEPTION_IS_NULL_POINTER);
+               } // END - if
+
+               // Get the action name from resolver
+               $actionName = $resolverInstance->getActionName();
+
+               // Store it away in this class
+               $filterInstance->setActionName($actionName);
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Protected setter for action name
+        *
+        * @param       $actionName             Action name to set
+        * @return      void
+        */
+       protected final function setActionName ($actionName) {
+               $this->actionName = (string) $actionName;
+       }
+
+       /**
+        * Getter for action name
+        *
+        * @return      $actionName             Action name to set
+        */
+       public final function getActionName () {
+               return $this->actionName;
+       }
+
+       /**
+        * Executes the filter 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
+        * @return      void
+        * @todo        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Try to get real discovery class
+               try {
+                       // Get an instance from the object factory
+                       $discoveryInstance = ObjectFactory::createObjectByConfiguredName($this->getActionName().'_payment_discovery', array($this));
+
+                       // Call the discovery method
+                       $discoveryInstance->discover($requestInstance);
+
+                       // Remember this instance if all wents fine
+                       Registry::getRegistry()->addInstance('payments', $discoveryInstance);
+               } catch (ConfigEntryNotFoundException $e) {
+                       // Something bad happend
+                       $requestInstance->requestIsValid(false);
+
+                       // Add a message to the response
+                       $responseInstance->addFatalMessage('payment_config_entry_error');
+                       $responseInstance->addFatalMessagePlain($e->getMessage());
+
+                       // Abort here
+                       return false;
+               } catch (ClassNotFoundException $e) {
+                       // Something bad happend
+                       $requestInstance->requestIsValid(false);
+
+                       // Add a message to the response
+                       $responseInstance->addFatalMessage('payment_class_error');
+                       $responseInstance->addFatalMessagePlain($e->getMessage());
+
+                       // Abort here
+                       return false;
+               }
+       }
+}
+
+// [EOF]
+?>
index 2f3502c..a188251 100644 (file)
@@ -634,8 +634,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
                } // END - if
 
                // Render the content
-               $content = sprintf("<option value=\"%s\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
-                       $subName,
+               $content = sprintf("<option value=\"invalid\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
                        $subName,
                        $subValue
                );
index bcc1fc5..51f5dca 100644 (file)
@@ -95,7 +95,7 @@ class ConsoleOutput extends BaseFrameworkSystem implements OutputStreamer {
                        }
                } else {
                        // Output it to the console
-                       printf("%s\n", trim(html_entity_decode(strip_tags($outStream))));
+                       printf("%s\n", trim(html_entity_decode(strip_tags(stripslashes($outStream)))));
                }
        }
 
index 7a50805..e82c0b7 100644 (file)
@@ -84,7 +84,7 @@ class WebOutput extends BaseFrameworkSystem implements OutputStreamer, Registera
         * @return      void
         */
        public final function output ($outStream=false) {
-               print($outStream);
+               print(stripslashes($outStream));
        }
 }
 
index 17c22e2..fb0f169 100644 (file)
@@ -72,7 +72,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable {
 
                // Now get a search criteria and set the user's name as criteria
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-               $criteriaInstance->addCriteria('points_uid', $this->getUserInstance()->getUserName());
+               $criteriaInstance->addCriteria("points_uid", $this->getUserInstance()->getUserName());
                $criteriaInstance->setLimit(1);
 
                // Get result back
index 4e5dbb1..b0dbac6 100644 (file)
@@ -70,7 +70,7 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the page as criteria to it at lease
-               $criteriaInstance->addCriteria('page', $page);
+               $criteriaInstance->addCriteria("page", $page);
 
                // Add limitation from config
                $criteriaInstance->setLimit($this->getConfigInstance()->readConfig("news_{$page}_limit"));
index 0c7f268..eef7b46 100644 (file)
@@ -68,7 +68,7 @@ class BaseActionResolver extends BaseResolver {
         *
         * @return      $actionName     Last validated action name
         */
-       protected final function getActionName () {
+       public final function getActionName () {
                return $this->actionName;
        }
 
index 2ecfaa2..0c3a4c7 100644 (file)
@@ -133,6 +133,17 @@ class BaseResponse extends BaseFrameworkSystem {
        }
 
        /**
+        * Adds a plain fatal message id to the response
+        *
+        * @param       $message        The plain message we shall add
+        * @return      void
+        */
+       public final function addFatalMessagePlain ($message) {
+               // Adds the resolved message id to the fatal message list
+               $this->fatalMessages[] = $message;
+       }
+
+       /**
         * Flushs the cached HTTP response to the outer world
         *
         * @param       $force  Wether we shall force the output or abort if headers are
index 7e1aa7c..2bbec44 100644 (file)
@@ -1098,7 +1098,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
 
                default: // Unknown type found
                        // Construct message
-                       $msg = sprintf("[%s-&gt;%s] Unknown/unsupported template type <strong>%s</strong> detected.",
+                       $msg = sprintf("[%s-&gt;%s] Unknown/unsupported template type <span class=\"data\">%s</span> detected.",
                                $this->__toString(),
                                __FUNCTION__,
                                $this->getTemplateType()
index 141f1de..726e850 100644 (file)
@@ -144,8 +144,8 @@ class Member extends BaseUser implements ManageableMember, Registerable, Updatea
                $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
 
                // And add our both entries
-               $updateInstance->addCriteria('last_activity', date("Y-m-d H:i:s", time()));
-               $updateInstance->addCriteria('last_action', $lastAction);
+               $updateInstance->addCriteria("last_activity", date("Y-m-d H:i:s", time()));
+               $updateInstance->addCriteria("last_action", $lastAction);
 
                // Add the search criteria for searching for the right entry
                $updateInstance->setSearchInstance($searchInstance);
index 266cf6f..6d3ede2 100644 (file)
@@ -61,7 +61,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                        // Read all directories but no sub directories
                        while ($dir = $dirPointer->readDirectoryExcept(array("..", ".", ".htaccess", ".svn"))) {
                                // Is this a class file?
-                               if ((substr($dir, 0, 6) == "class_") && (substr($dir, -4, 4) == FrameworkConfiguration::getInstance()->readConfig('php_extension'))) {
+                               if ((substr($dir, 0, 6) == "class_") && (substr($dir, -4, 4) == ".php")) {
                                        // Get the compressor's name. That's why you must name
                                        // your files like your classes and also that's why you
                                        // must keep on class in one file.
index d50782a..1cf6715 100644 (file)
@@ -30,7 +30,7 @@
 @require_once(dirname(__FILE__) . '/config/class_FrameworkConfiguration.php');
 
 // Get a new configuration instance
-$cfg = FrameworkConfiguration::createFrameworkConfiguration();
+$cfg = FrameworkConfiguration::getInstance();
 
 // CFG: SERVER-PATH
 $cfg->setConfigEntry('base_path', (dirname(dirname(__FILE__)) . '/')); // DON'T MISS THE TRAILING SLASH!!!
@@ -50,9 +50,6 @@ $cfg->setDefaultTimezone("Europe/Berlin");
 // CFG: MAGIC-QUOTES-RUNTIME
 $cfg->setMagicQuotesRuntime(false);
 
-// CFG: PHP-SCRIPT-EXTENSION
-$cfg->setConfigEntry('php_extension', ".php");
-
 // CFG: CLASS-PREFIX
 $cfg->setConfigEntry('class_prefix', "class_");
 
@@ -170,50 +167,50 @@ $cfg->setConfigEntry('file_input_class', "FileIoStream");
 // CFG: FILE-OUTPUT-STREAM
 $cfg->setConfigEntry('file_output_class', "FileIoStream");
 
-// CFG: EMAIL-VALIDATOR
-$cfg->setConfigEntry('email_validator_class', "EmailValidatorFilter");
+// CFG: EMAIL-VALIDATOR-FILTER
+$cfg->setConfigEntry('email_validator_filter', "EmailValidatorFilter");
 
-// CFG: USERNAME-VALIDATOR
-$cfg->setConfigEntry('username_validator_class', "UserNameValidatorFilter");
+// CFG: USERNAME-VALIDATOR-FILTER
+$cfg->setConfigEntry('username_validator_filter', "UserNameValidatorFilter");
 
-// CFG: USERNAME-IS-GUEST
-$cfg->setConfigEntry('username_is_guest_class', "UserNameIsGuestFilter");
+// CFG: USERNAME-IS-GUEST-FILTER
+$cfg->setConfigEntry('username_is_guest_filter', "UserNameIsGuestFilter");
 
-// CFG: PASSWORD-VALIDATOR
-$cfg->setConfigEntry('password_validator_class', "PasswordValidatorFilter");
+// CFG: PASSWORD-VALIDATOR-FILTER
+$cfg->setConfigEntry('password_validator_filter', "PasswordValidatorFilter");
 
-// CFG: RULES-ACCEPTED-CLASS
-$cfg->setConfigEntry('rules_accepted_class', "RulesAcceptedFilter");
+// CFG: RULES-ACCEPTED-FILTER
+$cfg->setConfigEntry('rules_accepted_filter', "RulesAcceptedFilter");
 
-// CFG: USERNAME-VERIFIER-CLASS
-$cfg->setConfigEntry('username_verifier_class', "UserNameVerifierFilter");
+// CFG: USERNAME-VERIFIER-FILTER
+$cfg->setConfigEntry('username_verifier_filter', "UserNameVerifierFilter");
 
-// CFG: USER-GUEST-VERIFIER-CLASS
-$cfg->setConfigEntry('user_guest_verifier_class', "UserGuestVerifierFilter");
+// CFG: USER-GUEST-VERIFIER-FILTER
+$cfg->setConfigEntry('user_guest_verifier_filter', "UserGuestVerifierFilter");
 
-// CFG: EMAIL-VERIFIER
-$cfg->setConfigEntry('email_verifier_class', "EmailVerifierFilter");
+// CFG: EMAIL-VERIFIER-FILTER
+$cfg->setConfigEntry('email_verifier_filter', "EmailVerifierFilter");
 
-// CFG: PASSWORD-VERIFIER-CLASS
-$cfg->setConfigEntry('password_verifier_class', "PasswordVerifierFilter");
+// CFG: PASSWORD-VERIFIER-FILTER
+$cfg->setConfigEntry('password_verifier_filter', "PasswordVerifierFilter");
 
-// CFG: PASSWD-GUEST-VERIFIER-CLASS
-$cfg->setConfigEntry('passwd_guest_verifier_class', "PasswordGuestVerifierFilter");
+// CFG: PASSWD-GUEST-VERIFIER-FILTER
+$cfg->setConfigEntry('passwd_guest_verifier_filter', "PasswordGuestVerifierFilter");
 
-// CFG: EMAIL-CHANGE-CLASS
-$cfg->setConfigEntry('email_change_class', "EmailChangeFilter");
+// CFG: EMAIL-CHANGE-FILTER
+$cfg->setConfigEntry('email_change_filter', "EmailChangeFilter");
 
-// CFG: PASSWORD-CHANGE-CLASS
-$cfg->setConfigEntry('password_change_class', "PasswordChangeFilter");
+// CFG: PASSWORD-CHANGE-FILTER
+$cfg->setConfigEntry('password_change_filter', "PasswordChangeFilter");
 
-// CFG: ACCOUNT-PASSWORD-CLASS
-$cfg->setConfigEntry('account_password_class', "AccountPasswordVerifierFilter");
+// CFG: ACCOUNT-PASSWORD-FILTER
+$cfg->setConfigEntry('account_password_filter', "AccountPasswordVerifierFilter");
 
-// CFG: USER-STATUS-CLASS
-$cfg->setConfigEntry('user_status_class', "UserStatusVerifierFilter");
+// CFG: USER-STATUS-FILTER
+$cfg->setConfigEntry('user_status_filter', "UserStatusVerifierFilter");
 
-// CFG: USER-UNCONFIRMED-CLASS
-$cfg->setConfigEntry('user_unconfirmed_class', "UserUnconfirmedVerifierFilter");
+// CFG: USER-UNCONFIRMED-FILTER
+$cfg->setConfigEntry('user_unconfirmed_filter', "UserUnconfirmedVerifierFilter");
 
 // CFG: CRYPTO-CLASS
 $cfg->setConfigEntry('crypto_class', "CryptoHelper");
@@ -267,7 +264,7 @@ $cfg->setConfigEntry('guest_class', "Guest");
 $cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours!
 
 // CFG: COOKIE-PATH
-$cfg->setConfigEntry('cookie_path', dirname($_SERVER['SCRIPT_NAME']) . "/");
+$cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . "/");
 
 // CFG: COOKIE-DOMAIN
 $cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same...
index 8f6fa15..2261c0f 100644 (file)
@@ -52,45 +52,17 @@ class FrameworkConfiguration implements Registerable {
        }
 
        /**
-        * "Create" a configuration instance
-        *
-        * @param       $enableDebug    Wether enable debug mode (default: off)
-        * @return      $cfgInstance    An instance of this configuration class
-        */
-       public final static function createFrameworkConfiguration ($enableDebug = false) {
-               /**
-                * For singleton design pattern because we only need a one-time-run
-                * through the initial configuration.
-                */
-               if (is_null(self::$cfgInstance))  {
-                       // CFG: ERROR-REPORTING
-                       @error_reporting(E_ALL | E_STRICT);
-
-                       /**
-                        * Shall we enable the debug mode?
-                        */
-                       if ($enableDebug) {
-                               define('DEBUG_MODE', true);
-                       }
-
-                       /**
-                        * Crate a config instance
-                        */
-                       self::$cfgInstance = new FrameworkConfiguration();
-               }
-
-               /**
-                * Return the instance
-                */
-               return self::$cfgInstance;
-       }
-
-       /**
         * Getter for an instance of this class
         *
         * @return      $cfgInstance    An instance of this class
         */
        public final static function getInstance () {
+               // is the instance there?
+               if (is_null(self::$cfgInstance))  {
+                       // Create a config instance
+                       self::$cfgInstance = new FrameworkConfiguration();
+               } // END - if
+
                return self::$cfgInstance;
        }
 
@@ -231,7 +203,7 @@ class FrameworkConfiguration implements Registerable {
                } // END - if
 
                // Construct the full URL now and secure it against CSRF attacks
-               $baseUrl = $baseUrl . "://" . $this->detectDomain() . dirname($_SERVER['SCRIPT_NAME']);
+               $baseUrl = $baseUrl . "://" . $this->detectDomain() . $this->detectScriptPath();
 
                // Return the URL
                return $baseUrl;
@@ -257,6 +229,24 @@ class FrameworkConfiguration implements Registerable {
        }
 
        /**
+        * Detect safely the script path without trailing slash which is the part
+        * between "http://your-domain.invalid/" and "script-name.php"
+        */
+       public function detectScriptPath () {
+               // Default is empty
+               $scriptPath = "";
+
+               // Is the scriptname set?
+               if (isset($_SERVER['SCRIPT_NAME'])) {
+                       // Get dirname of it
+                       $scriptPath = dirname($_SERVER['SCRIPT_NAME']);
+               } // END - if
+
+               // Return it
+               return $scriptPath;
+       }
+
+       /**
         * Getter for field name
         *
         * @param       $fieldName              Field name which we shall get
index 03bc377..de0c7d8 100644 (file)
@@ -29,10 +29,9 @@ $layerInstance = null;
 $cfg = FrameworkConfiguration::getInstance();
 
 // Generate FQFN for the database layer
-$INC = sprintf("%sinc/database/lib-%s%s",
+$INC = sprintf("%sinc/database/lib-%s.php",
        $cfg->readConfig('base_path'),
-       $cfg->readConfig('db_type'),
-       $cfg->readConfig('php_extension')
+       $cfg->readConfig('db_type')
 );
 
 // Load the database layer include
@@ -53,31 +52,34 @@ unset($INC);
 try {
        $db = DatabaseConnection::createDatabaseConnection(DebugMiddleware::getInstance(), $layerInstance);
 } catch (NullPointerException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
                $e->getMessage()
        ));
 } catch (InvalidDirectoryResourceException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
                $e->getMessage()
        ));
 } catch (PathIsEmptyException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
                $e->getMessage()
        ));
 } catch (PathIsNoDirectoryException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
                $e->getMessage()
        ));
 } catch (PathReadProtectedException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
                $e->getMessage()
        ));
 } catch (DirPointerNotOpenedException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <strong>%s</strong><br />\n",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: <span class=\"exception_reason\">%s</span><br />\n",
                $e->getMessage()
        ));
 }
 
+// Is the app variable there and valid?
+if (is_object($app)) $app->setDatabaseInstance($db);
+
 // Datenbankobjekt debuggen
 if (defined('DEBUG_DATABASE_OBJ')) {
        DebugMiddleware::getInstance()->output(sprintf("The database sub-system does now look like this:<br />
index ae748c5..9e9d5a6 100644 (file)
 try {
        $layerInstance = LocalFileDatabase::createLocalFileDatabase(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>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 } catch (SavePathNotFoundException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 } catch (SavePathIsNoDirectoryException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 } catch (SavePathReadProtectedException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 } catch (SavePathWriteProtectedException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <strong>%s</strong>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 }
index 0a5ec9b..c141fea 100644 (file)
@@ -27,5 +27,8 @@
 // Get the instance
 $io = ObjectFactory::createObjectByConfiguredName('file_io_class');
 
+// Is the app variable there and valid?
+if (is_object($app)) $app->setFileIoInstance($io);
+
 // [EOF]
 ?>
index 54bd39b..7e3f5c9 100644 (file)
@@ -26,7 +26,7 @@
 $cfg = FrameworkConfiguration::getInstance();
 
 // Include the class loader function
-require(sprintf("%sinc/loader/class_ClassLoader%s", $cfg->readConfig('base_path'), $cfg->readConfig('php_extension')));
+require(sprintf("%sinc/loader/class_ClassLoader.php", $cfg->readConfig('base_path')));
 
 // Does the user has an application specified?
 if (!empty($_GET['app'])) {
index 6db17c0..fe8847a 100644 (file)
@@ -26,22 +26,25 @@ try {
                FrameworkConfiguration::getInstance()->readConfig('lang_base_path')
        ));
 } catch (LanguagePathIsEmptyException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <strong>%s</strong>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 } catch (InvalidLanguagePathStringException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <strong>%s</strong>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 } catch (LanguagePathIsNoDirectoryException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <strong>%s</strong>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 } catch (LanguagePathReadProtectedException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <strong>%s</strong>",
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
        ));
 }
 
+// Is the app variable there and valid?
+if (is_object($app)) $app->setLanguageInstance($lang);
+
 // [EOF]
 ?>
index ddab769..d20cbcb 100644 (file)
@@ -29,6 +29,7 @@ $cfg = FrameworkConfiguration::getInstance();
 $configAppIncludes = array(
        sprintf("class_%s", $cfg->readConfig('app_helper_class')), // The ApplicationHelper class
        "config",               // The application's own configuration
+       "data",                 // Application data
        "init",                 // The application initializer
        "loader",               // The application's class loader
        "debug",                // Some debugging stuff
@@ -45,11 +46,10 @@ foreach ($configAppIncludes as $inc) {
        }
 
        // Generate a FQFN for the helper class
-       $fqfn = sprintf("%s%s/%s%s",
+       $fqfn = sprintf("%s%s/%s.php",
                $cfg->readConfig('application_path'),
                $cfg->readConfig('app_name'),
-               $inc,
-               $cfg->readConfig('php_extension')
+               $inc
        );
 
        // Does the include file exists?
@@ -58,8 +58,8 @@ foreach ($configAppIncludes as $inc) {
                require_once($fqfn);
        } elseif ($cfg->readConfig('verbose_level') > 0) {
                // File is missing
-               trigger_error(sprintf("Cannot load application script %s! File is missing or read-protected.",
-                       $inc . $cfg->readConfig('php_extension')
+               trigger_error(sprintf("Cannot load application script %s.php! File is missing or read-protected.",
+                       $inc
                ));
        }
 }