]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/class_ApplicationHelper.php
More style convensions applied, interface updated
[shipsimu.git] / application / ship-simu / class_ApplicationHelper.php
index 0e263851817a3483f2dba932a10385bab033a000..407b58804b7c42ad7e5cb4818ae1549ac49dee50 100644 (file)
@@ -60,11 +60,15 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
         */
        private $masterTemplate = "shipsimu_main";
 
         */
        private $masterTemplate = "shipsimu_main";
 
+       /**
+        * An instance of a controller
+        */
+       private $controllerInstance = null;
+
        /**
         * An instance of this class
         */
        private static $thisInstance = null;
        /**
         * An instance of this class
         */
        private static $thisInstance = null;
-
        /**
         * Protected constructor
         *
        /**
         * Protected constructor
         *
@@ -184,24 +188,35 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $responseInstance = HttpResponse::createHttpResponse($this);
 
                // Get command parameter
                $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)) {
 
                // 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
                }
 
                // 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
 
                // 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>");
        }
 }
 
        }
 }