]> git.mxchange.org Git - shipsimu.git/commitdiff
More style convensions applied, interface updated
authorRoland Häder <roland@mxchange.org>
Wed, 28 May 2008 19:06:00 +0000 (19:06 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 28 May 2008 19:06:00 +0000 (19:06 +0000)
41 files changed:
application/selector/class_ApplicationHelper.php
application/selector/class_ApplicationSelector.php
application/selector/init.php
application/selector/loader.php
application/selector/starter.php
application/ship-simu/class_ApplicationHelper.php
application/ship-simu/init.php
application/ship-simu/loader.php
application/ship-simu/main/class_Merchant.php
application/ship-simu/main/class_WorksContract.php
application/ship-simu/main/companies/class_ShippingCompany.php
application/ship-simu/main/constructions/berths/class_Berth.php
application/ship-simu/main/constructions/docks/class_DryDock.php
application/ship-simu/main/constructions/harbors/class_Harbor.php
application/ship-simu/main/constructions/terminals/class_Terminal.php
application/ship-simu/main/constructions/yards/class_Shipyard.php
application/ship-simu/main/drives/motor/class_Motor.php
application/ship-simu/main/parts/maschineroom/class_MaschineRoom.php
application/ship-simu/main/ships/passenger/class_PassengerShip.php
application/ship-simu/main/structures/extended/cabines/class_BaseCabin.php
application/ship-simu/main/structures/extended/decks/class_BaseDeck.php
application/ship-simu/main/structures/extended/upper/class_Bridge.php
application/ship-simu/starter.php
inc/classes/exceptions/template/class_InvalidTemplateVariableNameException.php
inc/classes/interfaces/application/class_ManageableApplication.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/commands/web/class_WebHomeCommand.php
inc/classes/main/commands/web/class_WebRegisterCommand.php
inc/classes/main/controller/form/class_WebDoFormController.php
inc/classes/main/factories/web/class_NewsFactory.php
inc/classes/main/helper/web/class_WebFormHelper.php
inc/classes/main/language/class_LanguageSystem.php
inc/classes/main/output/class_ConsoleOutput.php
inc/classes/main/request/class_HttpRequest.php
inc/classes/main/resolver/web/class_WebCommandResolver.php
inc/classes/main/resolver/web/class_WebControllerResolver.php
inc/classes/main/response/class_HttpResponse.php
inc/classes/main/template/class_TemplateEngine.php
inc/classes/middleware/compressor/class_CompressorChannel.php
inc/loader/class_ClassLoader.php
inc/selector.php

index feafd2489e39815195a031b898502b13abb7e421..3452f96d2c764aaad8a1a27b2a61917b267724ce 100644 (file)
@@ -193,6 +193,17 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // Insert all application templates
                $selInstance->insertApplicationTemplates();
        }
+
+       /**
+        * Handle the indexed array of fatal messages and puts them out in an
+        * acceptable fasion
+        *
+        * @param       $messageList    An array of fatal messages
+        * @return      void
+        */
+       public function handleFatalMessages (array $messageList) {
+               die("<pre>".print_r($messageList, true)."</pre>");
+       }
 }
 
 // [EOF]
index 2af2f708763f7f238eced3b757629faefdad4757..03e03ef1dc96e973479da6fced3aa35aacd92df4 100644 (file)
@@ -141,9 +141,9 @@ class ApplicationSelector extends BaseFrameworkSystem {
                        } elseif (!is_object($app)) {
                                // Not an object
                                throw new NoObjectException($app, self::EXCEPTION_IS_NO_OBJECT);
-                       } elseif (!method_exists($app, $this->getConfigInstance()->readConfig("entry_method"))) {
+                       } elseif (!method_exists($app, $this->getConfigInstance()->readConfig('entry_method'))) {
                                // Method not found!
-                               throw new MissingMethodException(array($app, $this->getConfigInstance()->readConfig("entry_method")), self::EXCEPTION_MISSING_METHOD);
+                               throw new MissingMethodException(array($app, $this->getConfigInstance()->readConfig('entry_method')), self::EXCEPTION_MISSING_METHOD);
                        }
 
                        // Add the current instance to the list
@@ -186,7 +186,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
         * @return      $shortName      This selector's short name
         */
        public function getAppShortName() {
-               $shortName = $this->getConfigInstance()->readConfig("selector_path");
+               $shortName = $this->getConfigInstance()->readConfig('selector_path');
                return $shortName;
        }
 
@@ -212,11 +212,11 @@ class ApplicationSelector extends BaseFrameworkSystem {
                // Generate the base path for all applications
                $appBasePath = sprintf("%s%s/",
                        PATH,
-                       $this->getConfigInstance()->readConfig("application_path")
+                       $this->getConfigInstance()->readConfig('application_path')
                );
 
                // Add the selector path to the ignore list
-               $this->addDirIgnoreList($this->getConfigInstance()->readConfig("selector_path"));
+               $this->addDirIgnoreList($this->getConfigInstance()->readConfig('selector_path'));
 
                // Get a directory pointer for the application path
                $dirInstance = FrameworkDirectoryPointer::createFrameworkDirectoryPointer($appBasePath);
@@ -233,7 +233,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
                        // Is this a readable directory? (files will be ignored silently)
                        if ((is_dir($fqfn)) && (is_readable($fqfn))) {
                                // Then get the init.php script for analyzing
-                               $initScript = sprintf("%s/init%s", $fqfn, $this->getConfigInstance()->readConfig("php_extension"));
+                               $initScript = sprintf("%s/init%s", $fqfn, $this->getConfigInstance()->readConfig('php_extension'));
 
                                // Load the application's init.php script and append the
                                // application to the ArrayObject
@@ -266,7 +266,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
 
                        // Try to load the web template
                        $tplEngine->loadWebTemplate(sprintf("%s_%s",
-                               $this->getConfigInstance()->readConfig("tpl_selector_prefix"),
+                               $this->getConfigInstance()->readConfig('tpl_selector_prefix'),
                                strtolower($appInstance->getAppShortName())
                        ));
 
@@ -301,7 +301,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
                $tplEngine = $this->prepareTemplateEngine($this);
 
                // Load the selector's template
-               $tplEngine->loadCodeTemplate($this->getConfigInstance()->readConfig("selector_main_tpl"));
+               $tplEngine->loadCodeTemplate($this->getConfigInstance()->readConfig('selector_main_tpl'));
 
                // Now store it in the class
                $this->setSelectorTemplateEngine($tplEngine);
@@ -323,7 +323,7 @@ class ApplicationSelector extends BaseFrameworkSystem {
                $tplEngine = $this->prepareTemplateEngine($this);
 
                // Load template which shall later hold all application templates
-               $tplEngine->loadCodeTemplate($this->getConfigInstance()->readConfig("selector_apps_tpl"));
+               $tplEngine->loadCodeTemplate($this->getConfigInstance()->readConfig('selector_apps_tpl'));
 
                // Add all loaded application templates together
                $dummy = "";
@@ -349,16 +349,6 @@ class ApplicationSelector extends BaseFrameworkSystem {
 
                } // END - for
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
 }
 
 // [EOF]
index cf84d6876a5d124d25ff887ce048e2a380ff8072..6a02f976ea3745f1ce80624da46a94423be1dc5c 100644 (file)
 //
 // Get an instance of the initializer
 $eval = sprintf("\$app = %s::getInstance();",
-       FrameworkConfiguration::getInstance()->readConfig("app_helper_class")
+       FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
 );
 eval($eval);
 
 // Set application name and version
 $app->setAppName("Applikationsausw&auml;hler");
 $app->setAppVersion("0.1a");
-$app->setAppShortName(FrameworkConfiguration::getInstance()->readConfig("selector_name"));
+$app->setAppShortName(FrameworkConfiguration::getInstance()->readConfig('selector_name'));
 
 // Initialize output system
 require(PATH . 'inc/output.php');
index 71c44c6e55b900bc11fd333daa38e57dac50b214..aafbd380a732c2fba4820823debe8ca72d0b4043 100644 (file)
@@ -28,7 +28,7 @@ if (!isset($application)) {
 }
 
 // Load all classes
-ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/", FrameworkConfiguration::getInstance()->readConfig("application_path"), $application));
+ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/", FrameworkConfiguration::getInstance()->readConfig('application_path'), $application));
 
 // Include all classes
 ClassLoader::getInstance()->includeAllClasses();
index a4b17b3a2d47855120bbccf5cfc17f25e5c95982..ca9d294c58dcd191054b1d56fcf03c229b3cdbdb 100644 (file)
@@ -30,26 +30,26 @@ if ((empty($app)) || (is_null($app))) {
        // Something went wrong!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <strong>%s</strong> could not be launched because the helper class <strong>%s</strong> is not loaded.",
                $application,
-               FrameworkConfiguration::getInstance()->readConfig("app_helper_class")
+               FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
        ));
 } elseif (!is_object($app)) {
        // No object!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <strong>%s</strong> could not be launched because &#39;app&#39; is not an object.",
                $application
        ));
-} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig("entry_method"))) {
+} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) {
        // Method not found!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <strong>%s</strong> could not be launched because the method <strong>%s</strong> is missing.",
                $application,
-               FrameworkConfiguration::getInstance()->readConfig("entry_method")
+               FrameworkConfiguration::getInstance()->readConfig('entry_method')
        ));
 }
 
 // Call the entry point method
 try {
        $eval = sprintf("%s::getInstance()->%s();",
-               FrameworkConfiguration::getInstance()->readConfig("app_helper_class"),
-               FrameworkConfiguration::getInstance()->readConfig("entry_method")
+               FrameworkConfiguration::getInstance()->readConfig('app_helper_class'),
+               FrameworkConfiguration::getInstance()->readConfig('entry_method')
        );
        eval($eval);
 } catch (FrameworkException  $e) {
index 0e263851817a3483f2dba932a10385bab033a000..407b58804b7c42ad7e5cb4818ae1549ac49dee50 100644 (file)
@@ -60,11 +60,15 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
         */
        private $masterTemplate = "shipsimu_main";
 
+       /**
+        * An instance of a controller
+        */
+       private $controllerInstance = null;
+
        /**
         * An instance of this class
         */
        private static $thisInstance = null;
-
        /**
         * Protected constructor
         *
@@ -184,24 +188,35 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $responseInstance = HttpResponse::createHttpResponse($this);
 
                // Get command parameter
-               $commandPara = $this->getConfigInstance()->readConfig("command_parameter");
+               $commandPara = $this->getConfigInstance()->readConfig('command_parameter');
 
                // Get the parameter from the request
                $commandName = $requestInstance->getRequestElement($commandPara);
 
                // If it is null then get default command
                if (is_null($commandName)) {
-                       $commandName = $this->getConfigInstance()->readConfig("default_command");
+                       $commandName = $this->getConfigInstance()->readConfig('default_command');
                }
 
                // Get a resolver
                $resolverInstance = WebControllerResolver::createWebControllerResolver($commandName, $this);
 
                // Get a new controller instance as well
-               $controllerInstance = $resolverInstance->resolveCommandController();
+               $this->controllerInstance = $resolverInstance->resolveCommandController();
 
                // Handle the request
-               $controllerInstance->handleRequest($requestInstance, $responseInstance);
+               $this->controllerInstance->handleRequest($requestInstance, $responseInstance);
+       }
+
+       /**
+        * Handle the indexed array of fatal messages and puts them out in an
+        * acceptable fasion
+        *
+        * @param       $messageList    An array of fatal messages
+        * @return      void
+        */
+       public function handleFatalMessages (array $messageList) {
+               die("<pre>".print_r($messageList, true)."</pre>");
        }
 }
 
index 3719970fa7ca9c6f5f0c0d46b58d6c75e18fd97e..ffc577c22f0f5a0b546e55d7192c1f7e607738d8 100644 (file)
@@ -35,7 +35,7 @@
 
 // Get an instance of the helper
 $eval = sprintf("\$app = %s::getInstance();",
-       FrameworkConfiguration::getInstance()->readConfig("app_helper_class")
+       FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
 );
 eval($eval);
 
index 0dffa20e3fa5292556228d2ed9e1e380f0bac844..35ecc298e4edf41828120a0f3ad11faa9ac97f39 100644 (file)
@@ -32,7 +32,7 @@ if (!isset($application)) {
 foreach ($lowerClasses as $class) {
        // Try to load the application classes
        try {
-               ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/%s", FrameworkConfiguration::getInstance()->readConfig("application_path"), $application, $class));
+               ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/%s", FrameworkConfiguration::getInstance()->readConfig('application_path'), $application, $class));
        } catch (PathIsNoDirectoryException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:%s] Kann Applikationsklassen im Pfad <strong>%s</strong> nicht laden. Grund: <strong>%s</strong>",
                        $application,
index 0d4ff104cc8814ebc8a89e32e0696dde8e2c33df..24d21b6a093b9f24dd27f3c78d64b186ecacc535 100644 (file)
@@ -184,16 +184,6 @@ class Merchant extends BaseFrameworkSystem {
                // Return price
                return $price;
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
 }
 
 // [EOF]
index cd2f0450937712276cd6003454b166802fa0e11a..96ce70dfbb59d56b5d4ff25d851f1c206cc7e0e8 100644 (file)
@@ -440,16 +440,6 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                // Return total price
                return $totalPrice;
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
 }
 
 // [EOF]
index dec3a3228f0316d3467e2536b03d8f15df224b4f..0ae0a1e5a9bcd8ce0f2dd04fe0b3f60f01499bb7 100644 (file)
@@ -646,23 +646,6 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                // Set the merchant in the contract (for getting prices)
                $contractInstance->setMerchantInstance($merchantInstance);
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 160b7bf4473818384d9b426d68c80a34029f712d..7d46833046172ba59a488e657e340ca34c6ddf52 100644 (file)
@@ -39,23 +39,6 @@ class Berth extends BaseConstruction {
                // Generate unique ID number
                $this->createUniqueID();
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 5209b569c6dd38b3e1ce5f1676d1a30a7b70eebe..b69692a8dd57bdcd0877cbf3ac44081f8d4d155c 100644 (file)
@@ -36,23 +36,6 @@ class DryDock extends BaseConstruction {
                // Generate unique ID number
                $this->createUniqueID();
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 3bdc297b34a2e5b503c9c4004f196d794ff44404..8922c42a936e1c54a0f70fcee17d0375c4567317 100644 (file)
@@ -110,23 +110,6 @@ class Harbor extends BaseConstruction {
                // Werft generieren und in die Werftliste aufnehmen
                $this->shipyardList->append(Shipyard::createShipyard($this, $shipyardName));
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index ad0a631bc30b05db336545626e792ad775784d50..d8fa8a059a068f412b0ae6080636e016a3c245e0 100644 (file)
@@ -36,23 +36,6 @@ class Terminal extends BaseConstruction {
                // Generate unique ID number
                $this->createUniqueID();
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 61d2500b485430bb0e85c702c6ad4caf76def60d..7df6e91eaa9377c903c6f5f921c86f58bc4f95a6 100644 (file)
@@ -166,11 +166,6 @@ class Shipyard extends BaseConstruction {
 
        // Add new personell
        public function addNewPersonell ($personell) {
-               if (is_null($this->staffList)) {
-                       // Opps, not initialized!
-                       ApplicationEntryPoint::app_die("New personell: <pre>".print_r($this, true)."</pre>");
-               }
-
                // Add to list
                $this->staffList->append($personell);
        }
@@ -231,23 +226,6 @@ class Shipyard extends BaseConstruction {
                // Return result
                return $result;
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 77e2ba9b43148fd94f5ffc92fc70ab555cceec93..b8f537701a39211ca80306c47d03d82d4583e07f 100644 (file)
@@ -67,23 +67,6 @@ class Motor extends BaseDrive implements TradeableItem, ConstructableShipPart {
        public function isTradeable () {
                return true;
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 1329eac9be559e139514a3ac5816816a77bdd3f4..78ae99815fd4cfaa515c3d9cf3d60b2187205989 100644 (file)
@@ -56,23 +56,6 @@ class MaschineRoom extends BaseShipPart {
                // Instanz zurueckgeben
                return $roomInstance;
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 3340a68aa632d8c94c1dfc9b6fca1c3ad64bc6d0..4e0dd198cc1b1207d54e44a0445a12fdcb532163 100644 (file)
@@ -123,20 +123,17 @@ class PassengerShip extends BaseShip implements ConstructableShip, LimitableObje
        }
 
        /**
-        * Stub!
+        * Reduces the volume of a processed object.
+        *
+        * @param               $limitInstance          An instance to ObjectLimits which holds
+        *                              attribute names that we want to include in the processing
+        *                              phase. Other attributes except $uniqueID and $realClass will
+        *                              be ignored and keept out.
+        * @return      void
         */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
+       function limitObject (ObjectLimits $limitInstance) {
+               // Work in progress
+               $this->partialStub("Unfinished method called.");
        }
 }
 
index ede1c4ef22059c6fa6180074930f2c6474994bde..6a9bb6bc419c53e9b9c9b81e838cb997a92a27e6 100644 (file)
@@ -35,23 +35,6 @@ class BaseCabin extends BaseCabinStructure {
        public final function isCabin () {
                return ($this->isClass("BaseCabin"));
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 292d8aee2d7f2e0a7e7c26d7eb29ab73a1d45d40..3675784734a68a8e1084529afeb2794071736878 100644 (file)
@@ -32,16 +32,6 @@ class BaseDeck extends BaseDeckStructure {
                // Set description
                $this->setObjectDescription("Allgemeines Deck");
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
 }
 
 // [EOF]
index bbd873b892103f388d967a886b0da0648c190daa..b0841d25f76857ca5f9bb3002168f54e0727b53b 100644 (file)
@@ -62,23 +62,6 @@ class Bridge extends BaseUpperStructure implements TradeableItem, ConstructableS
        public function isTradeable () {
                return true;
        }
-
-       /**
-        * Stub!
-        */
-       public function saveObjectToDatabase () {
-               $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
-                       $this->__toString(),
-                       __FUNCTION__
-               ));
-       }
-
-       /**
-        * Limits this object with an ObjectLimits instance
-        */
-       public function limitObject (ObjectLimits $limitInstance) {
-               ApplicationEntryPoint::app_die("".__METHOD__." reached! Stub!");
-       }
 }
 
 // [EOF]
index 7086fda8b04afea297703b3b0ba3fd49fd396681..468848daf090a9974de6093dff13361fdff2f068 100644 (file)
@@ -31,26 +31,26 @@ if ((empty($app)) || (is_null($app))) {
        // Something went wrong!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <strong>%s</strong> could not be launched because the helper class <strong>%s</strong> is not loaded.",
                $application,
-               FrameworkConfiguration::getInstance()->readConfig("app_helper_class")
+               FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
        ));
 } elseif (!is_object($app)) {
        // No object!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <strong>%s</strong> could not be launched because &#39;app&#39; is not an object.",
                $application
        ));
-} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig("entry_method"))) {
+} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) {
        // Method not found!
        ApplicationEntryPoint::app_die(sprintf("[Main:] The application <strong>%s</strong> could not be launched because the method <strong>%s</strong> is missing.",
                $application,
-               FrameworkConfiguration::getInstance()->readConfig("entry_method")
+               FrameworkConfiguration::getInstance()->readConfig('entry_method')
        ));
 }
 
 // Call the entry point method
 try {
        $eval = sprintf("%s::getInstance()->%s();",
-               FrameworkConfiguration::getInstance()->readConfig("app_helper_class"),
-               FrameworkConfiguration::getInstance()->readConfig("entry_method")
+               FrameworkConfiguration::getInstance()->readConfig('app_helper_class'),
+               FrameworkConfiguration::getInstance()->readConfig('entry_method')
        );
        eval($eval);
 } catch (FrameworkException  $e) {
index 43a5ec66d0e32595bd2386bf04210e47e2fdbf8a..01fd09fa434cb65dba4248015473f9d6fc568a10 100644 (file)
@@ -37,7 +37,7 @@ class InvalidTemplateVariableNameException extends FrameworkException {
                        $this->getLine(),
                        basename($classArray[1]),
                        $classArray[2],
-                       $classArray[3]->readConfig("tpl_valid_var")
+                       $classArray[3]->readConfig('tpl_valid_var')
                );
 
                // Call parent constructor
index 5bb3dac1bba97009a9d59ae746943e404093bb3d..d1d7267aad8c656f4c44f678de95b3cc2ce296c9 100644 (file)
@@ -84,6 +84,15 @@ interface ManageableApplication extends FrameworkInterface {
         * @return      void
         */
        function entryPoint ();
+
+       /**
+        * Handle the indexed array of fatal messages and puts them out in an
+        * acceptable fasion
+        *
+        * @param       $messageList    An array of fatal messages
+        * @return      void
+        */
+       function handleFatalMessages (array $messageList);
 }
 
 // [EOF]
index 75b851f85ef69b80fd3b5f8d88a652e65d8c1259..1ccb1c2c765fdb5d588fad9b0a122e9cd0676dc2 100644 (file)
@@ -288,16 +288,16 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        // Initialize debug instance
                        if (is_null($this->getDebugInstance())) {
                                // Set the debug output system if it is not debug class ;)
-                               $this->setDebugInstance(DebugMiddleware::createDebugMiddleware($this->getConfigInstance()->readConfig("debug_engine")));
+                               $this->setDebugInstance(DebugMiddleware::createDebugMiddleware($this->getConfigInstance()->readConfig('debug_engine')));
                        }
 
                        // Initialize web instance
                        if (is_null($this->getWebOutputInstance())) {
                                // Generate the eval() command
                                $eval = sprintf("\$this->setWebOutputInstance(%s::create%s(\"%s\"));",
-                                       $this->getConfigInstance()->readConfig("web_engine"),
-                                       $this->getConfigInstance()->readConfig("web_engine"),
-                                       $this->getConfigInstance()->readConfig("web_content_type")
+                                       $this->getConfigInstance()->readConfig('web_engine'),
+                                       $this->getConfigInstance()->readConfig('web_engine'),
+                                       $this->getConfigInstance()->readConfig('web_content_type')
                                );
 
                                // Debug message
@@ -315,7 +315,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                                // Set the compressor channel
                                $this->setCompressorChannel(CompressorChannel::createCompressorChannel(sprintf("%s%s",
                                        PATH,
-                                       $this->getConfigInstance()->readConfig("compressor_base_path")
+                                       $this->getConfigInstance()->readConfig('compressor_base_path')
                                )));
                        }
 
@@ -839,9 +839,9 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                // Generate FQFN for all application templates
                $fqfn = sprintf("%s%s/%s/%s",
                        PATH,
-                       $this->getConfigInstance()->readConfig("application_path"),
+                       $this->getConfigInstance()->readConfig('application_path'),
                        strtolower($appInstance->getAppShortName()),
-                       $this->getConfigInstance()->readConfig("tpl_base_path")
+                       $this->getConfigInstance()->readConfig('tpl_base_path')
                );
 
                // Are both instances set?
@@ -860,8 +860,8 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        \$appInstance->getLanguageInstance(),
        \$appInstance->getFileIoInstance()
 );",
-                       $this->getConfigInstance()->readConfig("tpl_engine"),
-                       $this->getConfigInstance()->readConfig("tpl_engine"),
+                       $this->getConfigInstance()->readConfig('tpl_engine'),
+                       $this->getConfigInstance()->readConfig('tpl_engine'),
                        $fqfn
                );
 
@@ -896,10 +896,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        public final function debugInstance () {
                // Generate the output
-               $content = "<pre>".trim(print_r($this, true))."</pre>";
+               $content = sprintf("<pre>%s</pre>",
+                       trim(print_r($this, true))
+               );
 
                // Output it
-               ApplicationEntryPoint::app_die("<strong>Debug output:</strong>".$content);
+               ApplicationEntryPoint::app_die(sprintf("<strong>%s debug output:</strong>%s", $this->__toString(), $content));
        }
 
        /**
index 7030bd158207de7d7f2b263a936e5d70c2ee1fcd..a0f95607bf5c9f2b74da35e8d048d3989f5bb419 100644 (file)
@@ -99,9 +99,9 @@ class WebHomeCommand extends BaseCommand implements Commandable {
                $templateInstance->loadCodeTemplate($masterTemplate);
 
                // Set title
-               $title = ucfirst($requestInstance->getRequestElement($this->getConfigInstance()->readConfig("command_parameter")));
+               $title = ucfirst($requestInstance->getRequestElement($this->getConfigInstance()->readConfig('command_parameter')));
                if (empty($title)) $title = "Home";
-               $templateInstance->assignVariable("title", $title);
+               $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
index 01ba9cd0dada952cb4b95c36ffbbdda4f3acfc68..8ed4a4416433dc77dbe52770c98a1c3aa08ff600 100644 (file)
@@ -103,9 +103,9 @@ class WebRegisterCommand extends BaseCommand implements Commandable {
                $templateInstance->loadCodeTemplate($masterTemplate);
 
                // Set title
-               $title = ucfirst($requestInstance->getRequestElement($this->getConfigInstance()->readConfig("command_parameter")));
+               $title = ucfirst($requestInstance->getRequestElement($this->getConfigInstance()->readConfig('command_parameter')));
                if (empty($title)) $title = "Register";
-               $templateInstance->assignVariable("title", $title);
+               $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
index bbb1d9cfa7c217ca1fcde19f171631febf90d464..9ffcf78b570e251022288df199e4272948c74861 100644 (file)
@@ -75,14 +75,15 @@ class WebDoFormController extends BaseController implements Controller {
                // Execute *very* generic pre filters
                $this->executePreFilters($requestInstance, $responseInstance);
 
-               // This request was valid! :-D
-               $requestInstance->requestIsValid();
+               // Is the request still valid? Post filters shall only be executed of
+               // the request is valid
+               if ($requestInstance->isRequestValid()) {
+                       // Execute the command
+                       $commandInstance->execute($requestInstance, $responseInstance);
 
-               // Execute the command
-               $commandInstance->execute($requestInstance, $responseInstance);
-
-               // Execute *very* generic ppost filters
-               $this->executePostFilters($requestInstance, $responseInstance);
+                       // Execute *very* generic ppost filters
+                       $this->executePostFilters($requestInstance, $responseInstance);
+               }
 
                // Flush the buffer out
                $responseInstance->flushBuffer();
index 3da66f9f7bd7f759fb74bebbbd6a14ef3f25a7b7..032f3ceb8f0b830ac3e0f04ce58bae170fabb370 100644 (file)
@@ -52,7 +52,7 @@ class NewsFactory extends BaseFactory {
                $factoryInstance = new NewsFactory();
 
                // Get the element name from configuration
-               $element = FrameworkConfiguration::getInstance()->readConfig("app_selector_get");
+               $element = FrameworkConfiguration::getInstance()->readConfig('app_selector_get');
 
                // Analyze the request, first get the Uni* application name (short one from URL)
                $appName = $requestInstance->getRequestElement($element);
index 0c761d8fc7f27a4bd76c6d7934ae8b1aa0ab2d60..fc14638408cca3c5214e30ed4887e4ba709d54ff 100644 (file)
@@ -118,9 +118,9 @@ class WebFormHelper extends BaseHelper {
                        // Add HTML code
                        $formContent = sprintf("<form name=\"%s\" class=\"forms\" action=\"%s\" method=\"%s\" target=\"%s\"",
                                $formName,
-                               $this->getConfigInstance()->readConfig("form_action"),
-                               $this->getConfigInstance()->readConfig("form_method"),
-                               $this->getConfigInstance()->readConfig("form_target")
+                               $this->getConfigInstance()->readConfig('form_action'),
+                               $this->getConfigInstance()->readConfig('form_method'),
+                               $this->getConfigInstance()->readConfig('form_target')
                        );
 
                        // Is the form id set?
@@ -139,7 +139,7 @@ class WebFormHelper extends BaseHelper {
                        $this->formName = $formName;
                } else {
                        // Add the hidden field required to identify safely this form
-                       $this->addInputHiddenField("form", $this->formName);
+                       $this->addInputHiddenField('form', $this->formName);
 
                        // Is a group open?
                        if ($this->groupOpened === true) {
@@ -519,7 +519,7 @@ class WebFormHelper extends BaseHelper {
         * @return      $required       Wether the email address is required
         */
        public function ifRegisterRequiresEmailVerification () {
-               $required = ($this->getConfigInstance()->readConfig("register_requires_email") == "Y");
+               $required = ($this->getConfigInstance()->readConfig('register_requires_email') == "Y");
                return $required;
        }
 
@@ -529,7 +529,7 @@ class WebFormHelper extends BaseHelper {
         * @return      $required       Wether profile shall be asked
         */
        public function ifRegisterIncludesProfile () {
-               $required = ($this->getConfigInstance()->readConfig("register_includes_profile") == "Y");
+               $required = ($this->getConfigInstance()->readConfig('register_includes_profile') == "Y");
                return $required;
        }
 
@@ -539,7 +539,7 @@ class WebFormHelper extends BaseHelper {
         * @return      $required       Wether personal data shall be asked
         */
        public function ifRegisterIncludesPersonaData () {
-               $required = ($this->getConfigInstance()->readConfig("register_personal_data") == "Y");
+               $required = ($this->getConfigInstance()->readConfig('register_personal_data') == "Y");
                return $required;
        }
 
index 47a7c0b4fa77cd3ff47cd394d606d6e945c4723d..6a830b4420d5ce40a4202c7ac7a39fcc64210f16 100644 (file)
@@ -101,7 +101,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage {
                $langInstance->initLanguageStrings();
 
                // Set language code from default config
-               $langInstance->setLanguageCode(FrameworkConfiguration::getInstance()->readConfig("default_lang"));
+               $langInstance->setLanguageCode(FrameworkConfiguration::getInstance()->readConfig('default_lang'));
 
                // Remember this instance
                self::$thisInstance = $langInstance;
@@ -161,6 +161,28 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage {
        public final function getLanguageCode () {
                return $this->langCode;
        }
+
+       /**
+        * Get the plain message from the cache variable for the given message id
+        *
+        * @param       $messageId              The message id we shall find in the cache variable
+        * @return      $messageText    The plain message text
+        */
+       public function getMessage ($messageId) {
+               // Default is missing message text
+               $messageText = sprintf("!%s!",
+                       $messageId
+               );
+
+               // Try to look it up in the cache variable
+               if ($this->langStrings->offsetExists($messageId)) {
+                       // Return the message string
+                       $messageText = $this->langStrings->offsetGet($messageId);
+               }
+
+               // Return the text
+               return $messageText;
+       }
 }
 
 // [EOF]
index 5d2b1c13528ffd600544f6334dcdb0db0a9a1092..c421ec4d3e9aacd98391790b92b25a7e78352ffc 100644 (file)
@@ -81,7 +81,7 @@ class ConsoleOutput extends BaseFrameworkSystem implements OutputStreamer {
         */
        public final static function getInstance() {
                if (is_null(self::$consoleInstance)) {
-                       $contentType = FrameworkConfiguration::getInstance()->readConfig("web_content_type");
+                       $contentType = FrameworkConfiguration::getInstance()->readConfig('web_content_type');
                        self::$consoleInstance = ConsoleOutput::createConsoleOutput($contentType);
                }
                return self::$consoleInstance;
index 2c1950ac52c4b4d4c628fd6a735ab6b138d69cf3..aa337db6a29e11654ea87553afc1a3e7c745200e 100644 (file)
@@ -28,9 +28,11 @@ class HttpRequest extends BaseFrameworkSystem implements Requestable {
        private $requestData = array();
 
        /**
-        * Wether this request is valid and can be further processed
+        * Wether this request is valid and can be further processed. The default is
+        * valid so make sure your intercepting filters sets this attribute to false
+        * when they need to intercept the data flow.
         */
-       private $requestIsValid = false;
+       private $requestIsValid = true;
 
        /**
         * Protected constructor
@@ -169,6 +171,15 @@ class HttpRequest extends BaseFrameworkSystem implements Requestable {
        public final function requestIsValid ($isValid = true) {
                $this->requestIsValid = (bool) $isValid;
        }
+
+       /**
+        * Returns wether this request is valid
+        *
+        * @return      $requestIsValid         Wether this request is valid
+        */
+       public final function isRequestValid () {
+               return $this->requestIsValid;
+       }
 }
 
 // [EOF]
index edfcbe3f7acd0edada98ab09790a79aacd75f6e3..d1bc85e5f69302144a967fa974f2dec43ff1bfc6 100644 (file)
@@ -94,10 +94,10 @@ class WebCommandResolver extends BaseResolver implements CommandResolver {
                // Test if the required parameter is set
                try {
                        // This goes fine so let's resolv the command
-                       $commandName = $requestInstance->getRequestElement($this->getConfigInstance()->readConfig("command_parameter"));
+                       $commandName = $requestInstance->getRequestElement($this->getConfigInstance()->readConfig('command_parameter'));
 
                        // Is the command empty? Then fall back to default command
-                       if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig("default_command");
+                       if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_command');
 
                        // Check if the command is valid
                        if (!$this->isCommandValid($commandName)) {
@@ -136,7 +136,7 @@ class WebCommandResolver extends BaseResolver implements CommandResolver {
                $commandInstance = null;
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig("default_command");
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_command');
 
                // Check if the command is valid
                if (!$this->isCommandValid($commandName)) {
@@ -161,7 +161,7 @@ class WebCommandResolver extends BaseResolver implements CommandResolver {
         */
        private function loadCommand ($commandName) {
                // Cache default command
-               $defaultCommand = $this->getConfigInstance()->readConfig("default_command");
+               $defaultCommand = $this->getConfigInstance()->readConfig('default_command');
 
                // Init command instance
                $commandInstance = null;
index 788a03c2cc73fb58f26f6c2889033c7419aa4401..fe03162bdf05f43df91318d008407a043b6f577f 100644 (file)
@@ -141,7 +141,7 @@ class WebControllerResolver extends BaseResolver implements ControllerResolver {
                 //
 
                // Cache default command
-               $defaultCommand = $this->getConfigInstance()->readConfig("default_command");
+               $defaultCommand = $this->getConfigInstance()->readConfig('default_command');
 
                // Init controller instance
                $controllerInstance = null;
@@ -155,7 +155,7 @@ class WebControllerResolver extends BaseResolver implements ControllerResolver {
                        $class = sprintf("Web%sController",
                                $this->convertToClassName($commandName)
                        );
-               } elseif ($this->getConfigInstance()->readConfig("home_with_news") == "Y") {
+               } elseif ($this->getConfigInstance()->readConfig('home_with_news') == "Y") {
                        // Yes, display news in home then set default controller with news
                        $class = "WebDefaultNewsController";
                } else {
index 064b3c8dea7d126c76efbc44350e288e8cc60390..39185e9948b76613b64c7613b84ff99abae50178 100644 (file)
@@ -111,6 +111,15 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
                $this->responseHeaders[$name] = $value;
        }
 
+       /**
+        * Reset the header array
+        *
+        * @return      void
+        */
+       public final function resetResponseHeaders () {
+               $this->responseHeaders = array();
+       }
+
        /**
         * "Writes" data to the response body
         *
@@ -121,6 +130,16 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
                $this->responseBody .= $output;
        }
 
+       /**
+        * Sets the response body to something new
+        *
+        * @param       $output         Output we shall sent in the HTTP response
+        * @return      void
+        */
+       public function setReponseBody ($output) {
+               $this->responseBody = $output;
+       }
+
        /**
         * Flushs the cached HTTP response to the outer world
         *
@@ -136,7 +155,7 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
                        throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT);
                } elseif (!headers_sent()) {
                        // Send headers out
-                       header("HTTP/1.0 {$this->responseStatus}");
+                       header("HTTP/1.1 {$this->responseStatus}");
 
                        // Used later
                        $now = gmdate('D, d M Y H:i:s') . ' GMT';
@@ -155,10 +174,21 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
                        }
                }
 
-               // Flush the output to the world
-               $this->getWebOutputInstance()->output($this->responseBody);
-               $this->reponseBody = "";
-               $this->responseHeaders = array();
+               // Are there some error messages?
+               if (count($this->fatalMessages) == 0) {
+                       // Flush the output to the world
+                       $this->getWebOutputInstance()->output($this->responseBody);
+               } else {
+                       // Display all error messages
+                       $this->getApplicationInstance()->handleFatalMessages($this->fatalMessages);
+
+                       // Send the error messages out to the world
+                       $this->getWebOutputInstance()->output($this->responseBody);
+               }
+
+               // Clear response header and body
+               $this->setReponseBody("");
+               $this->resetResponseHeaders();
        }
 
        /**
index 64902cbd2c65858c8e05427ac69b376e42e36d60..79fa5078ed6159d6eaf55957ccce5ce9275d1490 100644 (file)
@@ -180,11 +180,11 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                $tplInstance->setFileIoInstance($ioInstance);
 
                // Set template extensions
-               $tplInstance->setRawTemplateExtension($cfgInstance->readConfig("raw_template_extension"));
-               $tplInstance->setCodeTemplateExtension($cfgInstance->readConfig("code_template_extension"));
+               $tplInstance->setRawTemplateExtension($cfgInstance->readConfig('raw_template_extension'));
+               $tplInstance->setCodeTemplateExtension($cfgInstance->readConfig('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $tplInstance->setCompileOutputPath(PATH . $cfgInstance->readConfig("compile_output_path"));
+               $tplInstance->setCompileOutputPath(PATH . $cfgInstance->readConfig('compile_output_path'));
 
                // Return the prepared instance
                return $tplInstance;
@@ -518,7 +518,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
                $ext = $this->getRawTemplateExtension();
 
                // If we shall load a code-template we need to switch the file extension
-               if ($this->getTemplateType() == $this->getConfigInstance()->readConfig("code_template_type")) {
+               if ($this->getTemplateType() == $this->getConfigInstance()->readConfig('code_template_type')) {
                        // Switch over to the code-template extension
                        $ext = $this->getCodeTemplateExtension();
                }
@@ -905,7 +905,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         */
        public final function loadWebTemplate ($template) {
                // Set template type
-               $this->setTemplateType($this->getConfigInstance()->readConfig("web_template_type"));
+               $this->setTemplateType($this->getConfigInstance()->readConfig('web_template_type'));
 
                // Load the special template
                $this->loadTemplate($template);
@@ -920,7 +920,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         */
        public final function loadEmailTemplate ($template) {
                // Set template type
-               $this->setTemplateType($this->getConfigInstance()->readConfig("email_template_type"));
+               $this->setTemplateType($this->getConfigInstance()->readConfig('email_template_type'));
 
                // Load the special template
                $this->loadTemplate($template);
@@ -935,7 +935,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         */
        public final function loadCodeTemplate ($template) {
                // Set template type
-               $this->setTemplateType($this->getConfigInstance()->readConfig("code_template_type"));
+               $this->setTemplateType($this->getConfigInstance()->readConfig('code_template_type'));
 
                // Load the special template
                $this->loadTemplate($template);
@@ -948,7 +948,7 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         */
        public final function compileVariables () {
                // Initialize the $content array
-               $validVar = $this->getConfigInstance()->readConfig("tpl_valid_var");
+               $validVar = $this->getConfigInstance()->readConfig('tpl_valid_var');
                $dummy = array();
 
                // Iterate through all variables
@@ -1047,9 +1047,9 @@ class TemplateEngine extends BaseFrameworkSystem implements CompileableTemplate
         */
        public final function compileTemplate () {
                // We will only work with template type "code" from configuration
-               if ($this->getTemplateType() != $this->getConfigInstance()->readConfig("code_template_type")) {
+               if ($this->getTemplateType() != $this->getConfigInstance()->readConfig('code_template_type')) {
                        // Abort here
-                       throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), $this->getConfigInstance()->readConfig("code_template_type")), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED);
+                       throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), $this->getConfigInstance()->readConfig('code_template_type')), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED);
                } // END - if
 
                // Get the raw data.
index fd04ac118bdc9bde22430a9bd6faf09c4e096a4e..1b33041fd86b45946f8f2c8ca801f818e38fe4af 100644 (file)
@@ -55,7 +55,7 @@ class CompressorChannel extends BaseMiddleware {
                        // Read all directories but no sub directories
                        while ($dir = $dirPointer->readDirectoryExcept(array("..", ".", ".htaccess"))) {
                                // 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) == FrameworkConfiguration::getInstance()->readConfig('php_extension'))) {
                                        // Get the compressor's name. That's why you must name
                                        // your files like your classes and also that's why you
                                        // must keep on class in one file.
index 736649689127d55193e5c1a07dc5a9d085253f8a..edbe3cb2ff768186b9afff4c18e134c47ef9da88 100644 (file)
@@ -101,8 +101,8 @@ class ClassLoader {
                $this->dirList = new ArrayObject();
 
                // Set suffix and prefix from configuration
-               $this->suffix = $cfgInstance->readConfig("class_suffix");
-               $this->prefix = $cfgInstance->readConfig("class_prefix");
+               $this->suffix = $cfgInstance->readConfig('class_suffix');
+               $this->prefix = $cfgInstance->readConfig('class_prefix');
 
                // Estimate length of prefix and suffix for substr() function (cache)
                $this->sufLen = strlen($this->suffix);
@@ -289,9 +289,9 @@ class ClassLoader {
 }
 
 // Initial load of core classes and the FrameworkDirectoryPointer class
-require_once(sprintf("%sinc/classes/interfaces/class_FrameworkInterface%s", PATH, FrameworkConfiguration::getInstance()->readConfig("php_extension")));
-require_once(sprintf("%sinc/classes/main/class_BaseFrameworkSystem%s", PATH, FrameworkConfiguration::getInstance()->readConfig("php_extension")));
-require_once(sprintf("%sinc/classes/main/io/class_FrameworkDirectoryPointer%s", PATH, FrameworkConfiguration::getInstance()->readConfig("php_extension")));
+require_once(sprintf("%sinc/classes/interfaces/class_FrameworkInterface%s", PATH, FrameworkConfiguration::getInstance()->readConfig('php_extension')));
+require_once(sprintf("%sinc/classes/main/class_BaseFrameworkSystem%s", PATH, FrameworkConfiguration::getInstance()->readConfig('php_extension')));
+require_once(sprintf("%sinc/classes/main/io/class_FrameworkDirectoryPointer%s", PATH, FrameworkConfiguration::getInstance()->readConfig('php_extension')));
 
 // Initialize the class loader
 $loader = new ClassLoader(FrameworkConfiguration::getInstance());
index 0267bfa8020864bda509c57adebd99c2815d1acb..e608de177a80c7966a4085546e3e8fd4cb7230c0 100644 (file)
@@ -50,7 +50,7 @@ $application = preg_replace('/([^a-z_-])+/i', "", $application);
 
 // Try to load these includes in the given order
 $configAppIncludes = array(
-       sprintf("class_%s", FrameworkConfiguration::getInstance()->readConfig("app_helper_class")), // The ApplicationHelper class
+       sprintf("class_%s", FrameworkConfiguration::getInstance()->readConfig('app_helper_class')), // The ApplicationHelper class
        "config",               // The application's own configuration
        "init",                 // The application initializer
        "loader",               // The application's class loader