]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/resolver/action/web/class_WebActionResolver.php
Host name fixed (a redirect causes an error), duplicate code rewrriten to be more...
[core.git] / inc / classes / main / resolver / action / web / class_WebActionResolver.php
index de659a3ec0e8582f37ae6b0b3803ab4841a83746..b88d7c4470994c99b4a323ff495ca5e4adc4560e 100644 (file)
@@ -25,7 +25,7 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver {
        /**
         * Last successfull resolved action
         */
-       private $lastActionInstance = '';
+       private $lastActionInstance = null;
 
        /**
         * Protected constructor
@@ -37,7 +37,7 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver {
                parent::__construct(__CLASS__);
 
                // Set prefix to "Web"
-               $this->setActionPrefix("Web");
+               $this->setClassPrefix('Web');
        }
 
        /**
@@ -89,7 +89,9 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver {
                $actionName = $requestInstance->getRequestElement('action');
 
                // Is the action empty? Then fall back to default action
-               if (empty($actionName)) $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
+               if (empty($actionName)) {
+                       $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
+               } // END - if
 
                // Check if action is valid
                if ($this->isActionValid($actionName) === false) {
@@ -107,7 +109,7 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver {
                } // END - if
 
                // Set last action
-               $this->lastActionInstance = $actionInstance;
+               $this->setResolvedInstance($actionInstance);
 
                // Return the resolved action instance
                return $actionInstance;
@@ -127,13 +129,15 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver {
                $actionName = $this->getActionName();
 
                // Is the action empty? Then fall back to default action
-               if (empty($actionName)) $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
+               if (empty($actionName)) {
+                       $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
+               } // END - if
 
                // Check if action is valid
                if ($this->isActionValid($actionName) === false) {
                        // This action is invalid!
                        throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
-               }
+               } // END - if
 
                // Get the action
                $actionInstance = $this->loadAction();