]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/class_ApplicationHelper.php
Intercepting filter basicly added, generic form processor implemented (unfinished...
[shipsimu.git] / application / ship-simu / class_ApplicationHelper.php
index 75373862f40ca89aeb65ecd34ed0ef64a1781c05..b5ad8ee96d39e0dcffe234699570ef283f5dccfa 100644 (file)
@@ -183,11 +183,19 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                // ... and a new response object
                $responseInstance = HttpResponse::createHttpResponse($this);
 
-               // Get default command
-               $defaultCommand = $this->getConfigInstance()->readConfig("default_command");
+               // Get 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");
+               }
 
                // Get a resolver
-               $resolverInstance = WebControllerResolver::createWebControllerResolver($defaultCommand, $this);
+               $resolverInstance = WebControllerResolver::createWebControllerResolver($commandName, $this);
 
                // Get a new controller instance as well
                $controllerInstance = $resolverInstance->resolveDefaultController();