]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/resolver/web/class_WebControllerResolver.php
Logout procedure basicly finished, login area splitted in main and action-dependent...
[shipsimu.git] / inc / classes / main / resolver / web / class_WebControllerResolver.php
index 6dd5a39fe25a8c54d0782c7f75c91fed272098a3..1debf14ae63cd83d2df6ccab8e135ed2db13eed3 100644 (file)
@@ -95,31 +95,26 @@ class WebControllerResolver extends BaseResolver implements ControllerResolver {
                $commandName = "";
                $controllerInstance = null;
 
                $commandName = "";
                $controllerInstance = null;
 
-               // Try to resolv the command
-               try {
-                       // Get the command name 
-                       $commandName = $this->getCommandName();
-
-                       // Check if the command is valid
-                       if (!$this->isCommandValid($commandName)) {
-                               // This command is invalid!
-                               throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
-                       }
+               // Get the command name 
+               $commandName = $this->getCommandName();
 
 
-                       // Get the command
-                       $controllerInstance = $this->loadController($commandName);
+               // Check if the command is valid
+               if (!$this->isCommandValid($commandName)) {
+                       // This command is invalid!
+                       throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND);
+               } // END - if
 
 
-                       // And validate it
-                       if ((!is_object($controllerInstance)) || (!$controllerInstance instanceof Controller)) {
-                               // This command has an invalid instance!
-                               throw new InvalidControllerInstanceException(array($this, $commandName), self::EXCEPTION_INVALID_CONTROLLER);
-                       }
+               // Get the command
+               $controllerInstance = $this->loadController($commandName);
 
 
-                       // Set last controller
-                       $this->lastControllerInstance = $controllerInstance;
-               } catch (MissingArrayElementsException $e) {
-                       // Just catch it here...
-               }
+               // And validate it
+               if ((!is_object($controllerInstance)) || (!$controllerInstance instanceof Controller)) {
+                       // This command has an invalid instance!
+                       throw new InvalidControllerInstanceException(array($this, $commandName), self::EXCEPTION_INVALID_CONTROLLER);
+               } // END - if
+
+               // Set last controller
+               $this->lastControllerInstance = $controllerInstance;
 
                // Return the maybe resolved instance
                return $controllerInstance;
 
                // Return the maybe resolved instance
                return $controllerInstance;