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
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
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
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
));
}
*/
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]
*/
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)
} // 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";
} // 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>) -> ".$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>) -> ".$dbgInfo['function']."(".$info.")<br />\n";
} // END - if
$dbgMsg .= "Debug backtrace end<br />\n";
*/
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 ü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 überein!",
$array[0]->__toString(),
$this->getLine(),
strtoupper($array[1]),
*/
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],
*/
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],
*/
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ütig (kein Pfad).", $path);
+ $message = sprintf("Der angegebene Speicherpfad <span class=\"exception_reason\">%s</span> ist ungütig (kein Pfad).", $path);
// Call parent constructor
parent::__construct($message, $code);
*/
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ützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path);
+ $message = sprintf("Der Pfad <span class=\"exception_reason\">%s</span> ist lese-geschützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path);
// Call parent constructor
parent::__construct($message, $code);
*/
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ützt. Bitte Zugriffsrechte (CHMOD) entsprechend setzen.", $path);
+ $message = sprintf("Der angegebene Speicherpfad <span class=\"exception_reason\">%s</span> ist schreibgeschützt. Bitte Zugriffsrechte (CHMOD) entsprechend setzen.", $path);
// Call parent constructor
parent::__construct($message, $code);
*/
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(),
*/
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]
*/
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]
*/
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]
*/
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]
*/
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]
*/
public function __construct ($path, $code) {
// Add a message around the missing class
- $message = sprintf("Für den Pfad <span id=\"exception_reason\">%s</span> konnte kein Pointer initialisiert werden.", $path);
+ $message = sprintf("Für den Pfad <span class=\"exception_reason\">%s</span> konnte kein Pointer initialisiert werden.", $path);
// Call parent constructor
parent::__construct($message, $code);
*/
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
);
*/
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);
*/
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);
*/
public function __construct (array $msgArray, $code) {
// Add a message around the missing class
- $message = sprintf("[%s:%d] Eine unerwartete Datenlä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ä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],
*/
public function __construct (array $msgArray, $code) {
// Add a message around the missing class
- $message = sprintf("[%s:%d] Die MD5-Prüfsummen <span id=\"exception_reason\">%s</span> und <span id=\"exception_reason\">%s</span> stimmen nicht überein!",
+ $message = sprintf("[%s:%d] Die MD5-Prüfsummen <span class=\"exception_reason\">%s</span> und <span class=\"exception_reason\">%s</span> stimmen nicht überein!",
$msgArray[0]->__toString(),
$this->getLine(),
$msgArray[1],
*/
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ütig (kein Pfad).", $path);
+ $message = sprintf("Der angegebene Pfad <span class=\"exception_reason\">%s</span> ist ungütig (kein Pfad).", $path);
// Call parent constructor
parent::__construct($message, $code);
*/
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ützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path);
+ $message = sprintf("Der Pfad <span class=\"exception_reason\">%s</span> ist lese-geschützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path);
// Call parent constructor
parent::__construct($message, $code);
*/
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]
*/
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]
*/
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]
*/
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]
);
*/
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]
*/
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]
);
} 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
*/
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]
*/
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]
$dataArray = (array) $dataArray;
// Add a message around the missing class
- $message = sprintf("[%s:%d] Getter-Methode für Attribut <span id=\"exception_reason\">%s</span> nicht gefunden.",
+ $message = sprintf("[%s:%d] Getter-Methode für Attribut <span class=\"exception_reason\">%s</span> nicht gefunden.",
$dataArray[0]->__toString(),
$this->getLine(),
$dataArray[1]
*/
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],
*/
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],
*/
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]
*/
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]
}
// 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],
*/
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]
*/
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
);
*/
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
);
*/
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],
*/
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()
*/
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]
*/
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ützt! Bitte Zugriffsrechte (CHMOD) ändern.",
+ $message = sprintf("[%s:%d] Der Template-Basispfad <span class=\"exception_reason\">%s</span> ist lesegeschützt! Bitte Zugriffsrechte (CHMOD) ändern.",
$classArray[0]->__toString(),
$this->getLine(),
$classArray[1]
*/
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]
*/
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],
*/
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ültig.",
+ $message = sprintf("[%s:] View-Helper <span class=\"exception_reason\">%s</span> ist ungültig.",
$msgArray[0]->__toString(),
$msgArray[1]
);
*/
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]
*/
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()
*/
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]
--- /dev/null
+Deny from all
--- /dev/null
+<?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);
+}
+
+//
+?>
*/
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'));
}
}
$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()
));
}
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');
Registry::isInitialized('OK');
} elseif ($this->__toString() == 'DebugMiddleware') {
// Set configuration instance
- $this->setConfigInstance(FrameworkConfiguration::createFrameworkConfiguration());
+ $this->setConfigInstance(FrameworkConfiguration::getInstance());
}
}
* Stub method (only real cabins shall override it)
*
* @return boolean false = is no cabin, true = is a cabin
+ * @deprecated
*/
public function isCabin () {
return false;
*
* @return boolean false = is not tradeable by the Merchant class,
* true = is a tradeable object
+ * @deprecated
*/
public function isTradeable () {
return false;
);
// 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()
*/
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;
}
*/
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'));
}
}
// 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
));
$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
));
$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;
*/
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
$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
*
*/
public function addPreFilter (Filterable $filterInstance) {
// Add the pre filter
- $this->preFilterChain->addFilter($filterInstance);
+ $this->filterChains['pre']->addFilter($filterInstance);
}
/**
*/
public function addPostFilter (Filterable $filterInstance) {
// Add the post filter
- $this->postFilterChain->addFilter($filterInstance);
+ $this->filterChains['post']->addFilter($filterInstance);
}
/**
*/
protected function executePreFilters (Requestable $requestInstance, Responseable $responseInstance) {
// Execute all pre filters
- $this->preFilterChain->processFilters($requestInstance, $responseInstance);
+ $this->filterChains['pre']->processFilters($requestInstance, $responseInstance);
}
/**
*/
protected function executePostFilters (Requestable $requestInstance, Responseable $responseInstance) {
// Execute all post filters
- $this->postFilterChain->processFilters($requestInstance, $responseInstance);
+ $this->filterChains['post']->processFilters($requestInstance, $responseInstance);
}
}
$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 */
$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;
$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;
$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;
--- /dev/null
+<?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]
+?>
* @return void
*/
public final function outputStream ($output) {
- print(html_entity_decode(strip_tags($output)));
+ print(html_entity_decode(strip_tags(stripslashes($output))));
}
/**
public final function outputStream ($output) {
// Strip out <br />
$output = str_replace("<br />", "", $output);
- print($output."<br />\n");
+ print(stripslashes($output)."<br />\n");
}
/**
--- /dev/null
+Deny from all
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?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]
+?>
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++;
--- /dev/null
+Deny from all
--- /dev/null
+<?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]
+?>
} // 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
);
}
} 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)))));
}
}
* @return void
*/
public final function output ($outStream=false) {
- print($outStream);
+ print(stripslashes($outStream));
}
}
// 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
$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"));
*
* @return $actionName Last validated action name
*/
- protected final function getActionName () {
+ public final function getActionName () {
return $this->actionName;
}
$this->fatalMessages[] = $this->getApplicationInstance()->getLanguageInstance()->getMessage($messageId);
}
+ /**
+ * 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
*
default: // Unknown type found
// Construct message
- $msg = sprintf("[%s->%s] Unknown/unsupported template type <strong>%s</strong> detected.",
+ $msg = sprintf("[%s->%s] Unknown/unsupported template type <span class=\"data\">%s</span> detected.",
$this->__toString(),
__FUNCTION__,
$this->getTemplateType()
$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);
// 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.
@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!!!
// CFG: MAGIC-QUOTES-RUNTIME
$cfg->setMagicQuotesRuntime(false);
-// CFG: PHP-SCRIPT-EXTENSION
-$cfg->setConfigEntry('php_extension', ".php");
-
// CFG: CLASS-PREFIX
$cfg->setConfigEntry('class_prefix', "class_");
// 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");
$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...
// Empty for now
}
- /**
- * "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;
}
} // 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;
return $fullDomain;
}
+ /**
+ * 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
*
$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
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 />
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()
));
}
// Get the instance
$io = ObjectFactory::createObjectByConfiguredName('file_io_class');
+// Is the app variable there and valid?
+if (is_object($app)) $app->setFileIoInstance($io);
+
// [EOF]
?>
$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'])) {
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]
?>
$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
}
// 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?
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
));
}
}