]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/resolver/action/class_BaseActionResolver.php
Rewrite continues:
[core.git] / framework / main / classes / resolver / action / class_BaseActionResolver.php
index bec3e14bbbdf62c477bba2d741de0e70da83cb51..908ae59007c431e8b2586e4825be9fdd2b646f0b 100644 (file)
@@ -4,9 +4,11 @@ namespace CoreFramework\Resolver\Action;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\EmptyVariableException;
 use CoreFramework\Resolver\BaseResolver;
 
 use CoreFramework\Resolver\BaseResolver;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A generic action resolver class
  *
 /**
  * A generic action resolver class
  *
@@ -71,7 +73,7 @@ class BaseActionResolver extends BaseResolver {
         * @param       $namespace              Namespace to look in
         * @param       $actionName             The default action we shall execute
         * @return      $isValid                Whether the given action is valid
         * @param       $namespace              Namespace to look in
         * @param       $actionName             The default action we shall execute
         * @return      $isValid                Whether the given action is valid
-        * @throws      EmptyVariableException  Thrown if given action is not set
+        * @throws      InvalidArgumentException        Thrown if given action is not set
         */
        public function isActionValid ($namespace, $actionName) {
                // By default nothing shall be valid
         */
        public function isActionValid ($namespace, $actionName) {
                // By default nothing shall be valid
@@ -80,11 +82,11 @@ class BaseActionResolver extends BaseResolver {
                // Is a action set?
                if (empty($namespace)) {
                        // Then thrown an exception here
                // Is a action set?
                if (empty($namespace)) {
                        // Then thrown an exception here
-                       throw new EmptyVariableException(array($this, 'namespace'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+                       throw new InvalidArgumentException('Parameter "namespace" is empty');
                } elseif (empty($actionName)) {
                        // Then thrown an exception here
                } elseif (empty($actionName)) {
                        // Then thrown an exception here
-                       throw new EmptyVariableException(array($this, 'actionName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } // END - if
+                       throw new InvalidArgumentException('Parameter "actionName" is empty');
+               }
 
                // Create class name
                $className = sprintf(
 
                // Create class name
                $className = sprintf(