]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/resolver/action/html/class_HtmlActionResolver.php
Continued:
[core.git] / framework / main / classes / resolver / action / html / class_HtmlActionResolver.php
index 54d5fd76a859b043b610523c46d589fe9d886724..ad70b5b69080ccd9176a6963bfdf68d23ecea31e 100644 (file)
@@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Resolver\Action;
 
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 
 // Import SPL stuff
@@ -14,7 +15,7 @@ use \InvalidArgumentException;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2021 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -65,7 +66,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                // Is the variable $actionName set and the action is valid?
                if (empty($actionName)) {
                        // Then thrown an exception here
-                       throw new InvalidArgumentException('Parameter "actionName" is empty');
+                       throw new InvalidArgumentException('Parameter "actionName" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ($resolverInstance->isActionValid($actionName) === false) {
                        // Invalid action found
                        throw new InvalidActionException(array($resolverInstance, $actionName), self::EXCEPTION_INVALID_ACTION);
@@ -97,13 +98,13 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                // Is the action empty? Then fall back to default action
                if (empty($actionName)) {
                        $actionName = FrameworkBootstrap::getConfigurationInstance()->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();
@@ -112,7 +113,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                if ((!is_object($actionInstance)) || (!$actionInstance instanceof Actionable)) {
                        // This action has an invalid instance!
                        throw new InvalidActionInstanceException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
-               } // END - if
+               }
 
                // Set last action
                $this->setResolvedInstance($actionInstance);
@@ -137,13 +138,13 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                // Is the action empty? Then fall back to default action
                if (empty($actionName)) {
                        $actionName = FrameworkBootstrap::getConfigurationInstance()->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();