From: Roland Häder Date: Mon, 21 Apr 2008 11:50:22 +0000 (+0000) Subject: Messages translated to english, a lot uneccessary debug messages removed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a1581e4149e08719d2520fab502971bfd05fddb6;p=shipsimu.git Messages translated to english, a lot uneccessary debug messages removed --- diff --git a/application/selector/starter.php b/application/selector/starter.php index 9d0d8ac..a4b17b3 100644 --- a/application/selector/starter.php +++ b/application/selector/starter.php @@ -28,18 +28,18 @@ $app = ApplicationHelper::getInstance(); // Some sanity checks if ((empty($app)) || (is_null($app))) { // Something went wrong! - ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation %s kann nicht gestartet werden, da die Hilfsklasse %s nicht geladen ist!", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", $application, FrameworkConfiguration::getInstance()->readConfig("app_helper_class") )); } elseif (!is_object($app)) { // No object! - ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation %s kann nicht gestartet werden, da die 'app' kein Objekt ist!", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", $application )); } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig("entry_method"))) { // Method not found! - ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation %s kann nicht gestartet werden, da die Methode %s fehlt!", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", $application, FrameworkConfiguration::getInstance()->readConfig("entry_method") )); @@ -53,7 +53,7 @@ try { ); eval($eval); } catch (FrameworkException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation %s kann nicht gestartet werden. Grund: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched for the follwing reason: %s", $application, $e->getMessage() )); diff --git a/application/ship-simu/starter.php b/application/ship-simu/starter.php index 458ccf8..7086fda 100644 --- a/application/ship-simu/starter.php +++ b/application/ship-simu/starter.php @@ -29,18 +29,18 @@ $app = ApplicationHelper::getInstance(); // Some sanity checks if ((empty($app)) || (is_null($app))) { // Something went wrong! - ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation %s kann nicht gestartet werden, da die Hilfsklasse %s nicht geladen ist!", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", $application, FrameworkConfiguration::getInstance()->readConfig("app_helper_class") )); } elseif (!is_object($app)) { // No object! - ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation %s kann nicht gestartet werden, da die 'app' kein Objekt ist!", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", $application )); } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig("entry_method"))) { // Method not found! - ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation %s kann nicht gestartet werden, da die Methode %s fehlt!", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", $application, FrameworkConfiguration::getInstance()->readConfig("entry_method") )); @@ -54,7 +54,7 @@ try { ); eval($eval); } catch (FrameworkException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Die Applikation %s kann nicht gestartet werden. Grund: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched for the follwing reason: %s", $application, $e->getMessage() )); diff --git a/inc/classes.php b/inc/classes.php index 4b52f3f..2703421 100644 --- a/inc/classes.php +++ b/inc/classes.php @@ -35,19 +35,19 @@ foreach ($lowerClasses as $class) { try { ClassLoader::getInstance()->loadClasses(sprintf("inc/classes/%s/", $class)); } catch (PathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Framework-Klassen im Pfad %s nicht laden. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", $class )); } catch (PathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Framework-Klassen im Pfad %s nicht laden. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", $class )); } catch (PathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Framework-Klassen im Pfad %s nicht laden. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", $class )); } catch (DirPointerNotOpenedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Kann Framework-Klassen im Pfad %s nicht laden. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", $class )); } diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 6cc7a20..9db3049 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -257,7 +257,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { ); // Debug message - if ((defined('DEBUG_EVAL')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruierte PHP-Anweisung:
%s

\n", + if (defined('DEBUG_EVAL')) $this->getDebugInstance()->output(sprintf("[%s:] Constructed PHP command:
%s

\n", $this->__toString(), htmlentities($eval) )); @@ -284,11 +284,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { $this->setDatabaseInstance($db); } } - - // Debug output - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Alle Sub-Systeme sind initialisiert.
\n", - $this->__toString() - )); } } @@ -301,10 +296,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { */ public final function setConfigInstance (FrameworkConfiguration $configInstance) { self::$cfgInstance = $configInstance; - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Konfigurations-Handler auf %s gesetzt.
\n", - $this->__toString(), - $configInstance->__toString() - )); } /** @@ -313,10 +304,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return $cfhInstance - Configuration instance */ public final function getConfigInstance () { - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Konfigurations-Handler %s angefordert.
\n", - $this->__toString(), - self::$cfgInstance->__toString() - )); return self::$cfgInstance; } @@ -328,10 +315,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { */ public final function setDebugInstance (DebugMiddleware $debugInstance) { self::$debug = $debugInstance; - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Debug-Handler auf %s gesetzt.
\n", - $this->__toString(), - $this->getDebugInstance()->__toString() - )); } /** @@ -351,10 +334,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { */ public final function setWebOutputInstance (OutputStreamer $webInstance) { self::$webOutput = $webInstance; - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Web-Handler auf %s gesetzt.
\n", - $this->__toString(), - $this->getWebOutputInstance()->__toString() - )); } /** @@ -374,9 +353,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return void */ public final function setDatabaseInstance (DatabaseConnection $dbInstance) { - if ((defined('DEBUG_SYSTEM')) && (is_object($dbInstance->getDebugInstance()))) $dbInstance->getDebugInstance()->output(sprintf("[%s:] Datenbankschicht gesetzt.
\n", - $dbInstance->__toString() - )); $this->dbInstance = $dbInstance; } @@ -386,9 +362,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return $realClass The name of the real class (not BaseFrameworkSystem) */ public final function __toString () { - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] __toString() erreicht.
\n", - $this->realClass - )); return $this->realClass; } @@ -412,15 +385,8 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return void */ public final function createUniqueID () { - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] createUniqueID aufgerufen.
\n", - $this->__toString() - )); - // Existiert noch keine? if (empty($this->uniqueID)) { - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] createUniqueID erzeugt neue Unique-ID.
\n", - $this->__toString() - )); // Correct missing class name $corrected = false; @@ -463,13 +429,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Abort the loop break; } - } - - // Debug message - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] uniqueID ist auf %s gesetzt.
\n", - $this->__toString(), - $tempID - )); + } // END - while // Apply the new ID $this->setUniqueID($tempID); @@ -517,12 +477,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Cast to string $uniqueID = (string) $uniqueID; - // Debug message - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Unique-ID gesetzt auf %s.
\n", - $this->__toString(), - $uniqueID - )); - // Set the ID number $this->uniqueID = $uniqueID; } @@ -533,9 +487,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return $uniqueID The unique ID of this class */ public final function getUniqueID () { - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Unique-ID angefordert.
\n", - $this->__toString() - )); return $this->uniqueID; } @@ -547,10 +498,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { public final function resetUniqueID() { // Sweet and simple... ;-) $newUniqueID = $this->generateIdNumber(); - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Unique-ID zurückgesetzt auf %s.
\n", - $this->__toString(), - $newUniqueID - )); $this->setUniqueID($newUniqueID); } @@ -560,9 +507,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return $objectDescription The description of this simulation part */ public final function getObjectDescription () { - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] getObjectDescription erreicht.
\n", - $this->__toString() - )); if (isset($this->objectDescription)) { return $this->objectDescription; } else { @@ -578,10 +522,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { */ public final function setObjectDescription ($objectDescription) { $this->objectDescription = (String) $objectDescription; - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Teilbeschreibung wird auf %s gesetzt.
\n", - $this->__toString(), - $this->objectDescription - )); } /** @@ -618,11 +558,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return boolean The result of comparing both class names */ public final function isClass ($class) { - if ((defined('DEBUG_SYSTEM')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] %s=%s?
\n", - $this->__toString(), - $this->__toString(), - $class - )); return ($this->__toString() == $class); } @@ -666,10 +601,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Cast the number $value = (float) $value; - if (defined('DEBUG_CORE') && is_object($this->getDebugInstance())) $this->getDebugInstance()->output(sprintf("[%s:] %d wird umformatiert.
\n", - $this->__toString(), - $value - )); // Reformat the US number $price = sprintf("%s %s", @@ -687,9 +618,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return void */ public final function removeNumberFormaters () { - if (defined('DEBUG_CORE') && is_object($this->getDebugInstance())) $this->getDebugInstance()->output(sprintf("[%s:] Zahlenumformatierungszeichen werden entfernt.
\n", - $this->__toString() - )); unset($this->thousands); unset($this->decimals); } @@ -700,10 +628,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @return $dbInstance The database layer instance */ public final function getDatabaseInstance () { - if (defined('DEBUG_CORE') && is_object($this->getDebugInstance())) $this->getDebugInstance()->output(sprintf("[%s:] Datenbank-Instanz %s angefordert.
\n", - $this->__toString(), - $this->dbInstance - )); return $this->dbInstance; } @@ -899,7 +823,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Debug message if ((!is_null($this->getDebugInstance())) && (defined('DEBUG_EVAL'))) { - $this->getDebugInstance()->output(sprintf("[%s:] Konstruierte PHP-Anweisung:
%s

\n", + $this->getDebugInstance()->output(sprintf("[%s:] Constructed PHP command:
%s

\n", $this->__toString(), htmlentities($eval) )); diff --git a/inc/classes/main/commands/local/class_LocalHomeCommand.php b/inc/classes/main/commands/local/class_LocalHomeCommand.php index 24ef746..033e1af 100644 --- a/inc/classes/main/commands/local/class_LocalHomeCommand.php +++ b/inc/classes/main/commands/local/class_LocalHomeCommand.php @@ -90,6 +90,11 @@ class LocalHomeCommand extends BaseCommand implements Commandable { // Compile it... $templateInstance->compileTemplate(); + // Set title + $title = ucfirst($requestInstance->getRequestElement($this->getConfigInstance()->readConfig("command_parameter"))); + if (empty($title)) $title = "Home"; + $templateInstance->assignVariable("title", $title); + // ... and all variables. This should be merged together in a pattern // to make things easier. A cache mechanism should be added between // these two calls to cache compiled templates. diff --git a/inc/classes/main/compressor/class_Bzip2Compressor.php b/inc/classes/main/compressor/class_Bzip2Compressor.php index 272a558..88322b6 100644 --- a/inc/classes/main/compressor/class_Bzip2Compressor.php +++ b/inc/classes/main/compressor/class_Bzip2Compressor.php @@ -31,11 +31,6 @@ class Bzip2Compressor extends BaseFrameworkSystem implements Compressor { // Call parent constructor! parent::__construct(__CLASS__); - // Debug message - if (((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruktor erreicht.
\n", - $this->__toString() - )); - // Set description $this->setObjectDescription("BZIP2-Kompressor"); @@ -53,19 +48,9 @@ class Bzip2Compressor extends BaseFrameworkSystem implements Compressor { if ((function_exists('bzcompress')) && (function_exists('bzdecompress'))) { // Compressor can maybe be used $cInstance = new Bzip2Compressor(); - - // Debug message - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $cInstance->getDebugInstance()->output(sprintf("[%s:] BZIP2-Kompression wird verwendet.
\n", - $cInstance->__toString() - )); } else { // Routines not found! $cInstance = null; - - // Debug message - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $cInstance->getDebugInstance()->output(sprintf("[%s:] BZIP2-Kompressionsroutinen nicht gefunden.
\n", - $cInstance->__toString() - )); } // Return the compressor instance @@ -112,9 +97,6 @@ class Bzip2Compressor extends BaseFrameworkSystem implements Compressor { * @return $string Returns always "bz2" */ public final function getCompressorExtension () { - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Dateierweiterung angefordert.
\n", - $this->__toString() - )); return "bz2"; } } diff --git a/inc/classes/main/compressor/class_GzipCompressor.php b/inc/classes/main/compressor/class_GzipCompressor.php index 208e12b..4e95f80 100644 --- a/inc/classes/main/compressor/class_GzipCompressor.php +++ b/inc/classes/main/compressor/class_GzipCompressor.php @@ -31,11 +31,6 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor { // Call parent constructor! parent::__construct(__CLASS__); - // Debug message - if (((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruktor erreicht.
\n", - $this->__toString() - )); - // Set description $this->setObjectDescription("GZIP-Kompressor"); @@ -53,19 +48,9 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor { if ((function_exists('gzcompress')) && (function_exists('gzuncompress'))) { // Compressor can maybe be used $cInstance = new GzipCompressor(); - - // Debug message - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $cInstance->getDebugInstance()->output(sprintf("[%s:] GZIP-Kompression wird verwendet.
\n", - $cInstance->__toString() - )); } else { // Routines not found! $cInstance = null; - - // Debug message - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $cInstance->getDebugInstance()->output(sprintf("[%s:] GZIP-Kompressionsroutinen nicht gefunden.
\n", - $cInstance->__toString() - )); } // Return the compressor instance @@ -112,9 +97,6 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor { * @return $string Returns always "gz" */ public final function getCompressorExtension () { - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Dateierweiterung angefordert.
\n", - $this->__toString() - )); return "gz"; } } diff --git a/inc/classes/main/compressor/class_NullCompressor.php b/inc/classes/main/compressor/class_NullCompressor.php index 74cb5d3..a8a570c 100644 --- a/inc/classes/main/compressor/class_NullCompressor.php +++ b/inc/classes/main/compressor/class_NullCompressor.php @@ -31,11 +31,6 @@ class NullCompressor extends BaseFrameworkSystem implements Compressor { // Call parent constructor! parent::__construct(__CLASS__); - // Debug message - if (((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruktor erreicht.
\n", - $this->__toString() - )); - // Set description $this->setObjectDescription("Null-Kompressor"); @@ -96,9 +91,6 @@ class NullCompressor extends BaseFrameworkSystem implements Compressor { * @return $string Returns always "null" */ public final function getCompressorExtension () { - if ((defined('DEBUG_COMPRESSOR')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Dateierweiterung angefordert.
\n", - $this->__toString() - )); return "null"; } } diff --git a/inc/classes/main/database/class_BaseDatabaseFrontend.php b/inc/classes/main/database/class_BaseDatabaseFrontend.php index 790b424..ac31d50 100644 --- a/inc/classes/main/database/class_BaseDatabaseFrontend.php +++ b/inc/classes/main/database/class_BaseDatabaseFrontend.php @@ -37,11 +37,6 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implements Datab // Call parent constructor parent::__construct($class); - // Debug message - if (((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruktor erreicht.
\n", - $this->__toString() - )); - // Clean up a little $this->removeNumberFormaters(); } @@ -52,10 +47,6 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implements Datab * @return $limitInstance The instance to the object ObjectLimits */ public final function getLimitInstance () { - if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Limitierungsinstanz %s angefordert.
\n", - $this->__toString(), - $this->limitInstance->__toString() - )); return $this->limitInstance; } @@ -68,12 +59,6 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implements Datab * @return void */ public final function limitObject (ObjectLimits $limitInstance) { - // Debug message - if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Limitierungsinstanz %s soll verwendet werden.
\n", - $this->__toString(), - $limitInstance->__toString() - )); - // Get limitArray for validation $array = $limitInstance->getLimitArray(); @@ -81,13 +66,6 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implements Datab if ($array->count() > 0) { // Okay, there is enougth $this->limitInstance = $limitInstance; - - // Debug message - if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Limitierungsinstanz %s wird verwendet und beinhaltet %s Einträge.
\n", - $this->__toString(), - $limitInstance->__toString(), - $array->count() - )); } } } diff --git a/inc/classes/main/database/classes/class_LocalFileDatabase.php b/inc/classes/main/database/classes/class_LocalFileDatabase.php index 7ac2b7d..84babfe 100644 --- a/inc/classes/main/database/classes/class_LocalFileDatabase.php +++ b/inc/classes/main/database/classes/class_LocalFileDatabase.php @@ -99,11 +99,6 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend throw new SavePathWriteProtectedException($savePath, self::EXCEPTION_WRITE_PROTECED_PATH); } - // Debug output - if (defined('DEBUG_DATABASE')) $dbInstance->getDebugInstance()->output(sprintf("[%s:] Es werden lokale Dateien zum Speichern von Objekten verwendet.
\n", - $dbInstance->__toString() - )); - // Set save path and IO instance $dbInstance->setSavePath($savePath); $dbInstance->setFileIOInstance($ioInstance); @@ -122,12 +117,6 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend // Secure string $savePath = (string) $savePath; - // Debug message - if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Lokaler Speicherpfad %s wird verwendet.
\n", - $this->__toString(), - $savePath - )); - // Set save path $this->savePath = $savePath; } @@ -164,24 +153,11 @@ class LocalFileDatabase extends BaseDatabaseFrontend implements DatabaseFrontend throw new MissingMethodException(array($object, '__toString'), self::EXCEPTION_MISSING_METHOD); } - // Debug message - if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Das Objekt %s soll in eine lokale Datei gespeichert werden.
\n", - $this->__toString(), - $object->__toString() - )); - // Get a string containing the serialized object. We cannot exchange // $this and $object here because $object does not need to worry // about it's limitations... ;-) $serialized = $this->serializeObject($object); - // Debug message - if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Das Objekt %s ist nach der Serialisierung %s Byte gross.
\n", - $this->__toString(), - $object->__toString(), - strlen($serialized) - )); - // Get a path name plus file name and append the extension $fqfn = $this->getSavePath() . $object->getPathFileNameFromObject() . "." . $this->getFileExtension(); diff --git a/inc/classes/main/extended/class_SerializationContainer.php b/inc/classes/main/extended/class_SerializationContainer.php index b07bfc9..a0980e3 100644 --- a/inc/classes/main/extended/class_SerializationContainer.php +++ b/inc/classes/main/extended/class_SerializationContainer.php @@ -31,9 +31,6 @@ class SerializationContainer extends FrameworkArrayObject { public function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Debug message - if ((defined('DEBUG_CONTAINER')) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output("[SerializationContainer:] Konstruktor erreicht.
\n"); } /** @@ -64,7 +61,7 @@ class SerializationContainer extends FrameworkArrayObject { ); // Debug eval command - if ((defined('DEBUG_EVAL')) || (defined('DEBUG_ALL'))) $limitInstance->getDebugInstance()->output(sprintf("[%s:] Konstruierte PHP-Anweisung:
%s

\n", + if (defined('DEBUG_EVAL')) $limitInstance->getDebugInstance()->output(sprintf("[%s:] Constructed PHP command:
%s

\n", $this->__toString(), htmlentities($eval) )); diff --git a/inc/classes/main/template/class_TemplateEngine.php b/inc/classes/main/template/class_TemplateEngine.php index 6e09d89..c9e05ab 100644 --- a/inc/classes/main/template/class_TemplateEngine.php +++ b/inc/classes/main/template/class_TemplateEngine.php @@ -547,13 +547,6 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate * required method */ private function loadRawTemplateData ($fqfn) { - // Debug message - if ((defined('DEBUG_TEMPLATE')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Template %s vom Typ %s wird geladen.
\n", - $this->__toString(), - $template, - $this->getTemplateType() - )); - // Get a input/output instance from the middleware $ioInstance = $this->getFileIOInstance(); @@ -572,12 +565,6 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate // Load the raw template $rawTemplateData = $ioInstance->loadFileContents($fqfn); - // Debug message - if ((defined('DEBUG_TEMPLATE')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] %s Byte Rohdaten geladen.
\n", - $this->__toString(), - strlen($rawTemplateData) - )); - // Store the template's contents into this class $this->setRawTemplateData($rawTemplateData); @@ -1004,7 +991,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate ); // Debug message - if (((defined('DEBUG_EVAL')) || (defined('DEBUG_ALL'))) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruierte PHP-Anweisung:
%s

\n", + if ((defined('DEBUG_EVAL')) && (is_object($this->getDebugInstance()))) $this->getDebugInstance()->output(sprintf("[%s:] Constructed PHP command:
%s

\n", $this->__toString(), htmlentities($eval) )); diff --git a/inc/database.php b/inc/database.php index 99611ea..ad29f0e 100644 --- a/inc/database.php +++ b/inc/database.php @@ -54,34 +54,34 @@ unset($INC); try { $db = DatabaseConnection::createDatabaseConnection(DebugMiddleware::getInstance(), $layer); } catch (NullPointerException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Datenbank-System nicht initialisiert. Reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (InvalidDirectoryResourceException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Datenbank-System nicht initialisiert. Reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (PathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Datenbank-System nicht initialisiert. Reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (PathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Datenbank-System nicht initialisiert. Reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (PathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Datenbank-System nicht initialisiert. Reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (DirPointerNotOpenedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Datenbank-System nicht initialisiert. Reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } // Datenbankobjekt debuggen if (defined('DEBUG_DATABASE_OBJ')) { - DebugMiddleware::getInstance()->output(sprintf("Die Datenbank-Schicht sieht wie folgt aus:
+ DebugMiddleware::getInstance()->output(sprintf("The database sub-system does now look like this:
%s
\n", print_r($db, true) )); diff --git a/inc/language.php b/inc/language.php index 58ea69e..552dc45 100644 --- a/inc/language.php +++ b/inc/language.php @@ -26,19 +26,19 @@ try { FrameworkConfiguration::getInstance()->readConfig("lang_base_path") )); } catch (LanguagePathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Sprachsystem konnte nicht initialisiert werden. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } catch (InvalidLanguagePathStringException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Sprachsystem konnte nicht initialisiert werden. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } catch (LanguagePathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Sprachsystem konnte nicht initialisiert werden. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } catch (LanguagePathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Sprachsystem konnte nicht initialisiert werden. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } diff --git a/inc/output.php b/inc/output.php index 72ff36b..20f3fe8 100644 --- a/inc/output.php +++ b/inc/output.php @@ -22,10 +22,10 @@ * along with this program. If not, see . */ -// Debug-Ausgabe vorbereiten +// Get a debugger instance $debug = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getInstance()->readConfig("debug_engine")); -// Leere Strings werden ignoriert und sollten zum Testen der Middleware genommen werden +// Empty string should be ignored and used for testing the middleware DebugMiddleware::getInstance()->output(""); // [EOF]