Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / resolver / action / html / class_HtmlActionResolver.php
index e27ff3f5994d1317b28f9cd01fcb2aa5a763848d..38040fd458faa4f5121502eff7c5a7dfde2ff279 100644 (file)
@@ -1,11 +1,13 @@
 <?php
 // Own namespace
-namespace CoreFramework\Resolver\Action;
+namespace Org\Mxchange\CoreFramework\Resolver\Action;
 
 // Import framework stuff
-use CoreFramework\Generic\EmptyVariableException;
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+
+// Import SPL stuff
+use \InvalidArgumentException;
 
 /**
  * A action resolver for local (non-hubbed) actions
@@ -54,7 +56,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
         * @param       $actionName                             The default action we shall execute
         * @param       $applicationInstance    An instance of a manageable application helper class
         * @return      $resolverInstance               The prepared action resolver instance
-        * @throws      EmptyVariableException  Thrown if default action is not set
+        * @throws      InvalidArgumentException        Thrown if default action is not set
         * @throws      InvalidActionException  Thrown if default action is invalid
         */
        public static final function createHtmlActionResolver ($actionName, ManageableApplication $applicationInstance) {
@@ -64,8 +66,8 @@ 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 EmptyVariableException(array($resolverInstance, 'defaultAction'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } elseif ($resolverInstance->isActionValid($actionName) === FALSE) {
+                       throw new InvalidArgumentException('Parameter "actionName" is empty');
+               } elseif ($resolverInstance->isActionValid($actionName) === false) {
                        // Invalid action found
                        throw new InvalidActionException(array($resolverInstance, $actionName), self::EXCEPTION_INVALID_ACTION);
                }
@@ -102,7 +104,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                } // END - if
 
                // Check if action is valid
-               if ($this->isActionValid($actionName) === FALSE) {
+               if ($this->isActionValid($actionName) === false) {
                        // This action is invalid!
                        throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
                } // END - if
@@ -142,7 +144,7 @@ class HtmlActionResolver extends BaseActionResolver implements ActionResolver {
                } // END - if
 
                // Check if action is valid
-               if ($this->isActionValid($actionName) === FALSE) {
+               if ($this->isActionValid($actionName) === false) {
                        // This action is invalid!
                        throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
                } // END - if