Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / resolver / command / image / class_ImageCommandResolver.php
index b62109c758d1190e9fca34cb8b25b5bf3aea6fe6..9e642c38979840d6229c4569af38c2295c1b05f6 100644 (file)
@@ -1,11 +1,13 @@
 <?php
 // Own namespace
-namespace CoreFramework\Resolver\Command;
+namespace Org\Mxchange\CoreFramework\Resolver\Command;
 
 // Import framework stuff
-use CoreFramework\Command\InvalidCommandException;
-use CoreFramework\Generic\EmptyVariableException;
-use CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
+
+// Import SPL stuff
+use \InvalidArgumentException;
 
 /**
  * A command resolver for local (non-hubbed) image commands
@@ -54,7 +56,7 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve
         * @param       $commandName                            The default command we shall execute
         * @param       $applicationInstance            An instance of a manageable application helper class
         * @return      $resolverInstance                       The prepared command resolver instance
-        * @throws      EmptyVariableException          Thrown if default command is not set
+        * @throws      InvalidArgumentException                Thrown if default command is not set
         * @throws      InvalidCommandException         Thrown if default command is invalid
         */
        public static final function createImageCommandResolver ($commandName, ManageableApplication $applicationInstance) {
@@ -64,8 +66,8 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve
                // Is the variable $commandName set and the command is valid?
                if (empty($commandName)) {
                        // Then thrown an exception here
-                       throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } elseif ($resolverInstance->isCommandValid($commandName) === FALSE) {
+                       throw new InvalidArgumentException('Parameter "commandName" is empty');
+               } elseif ($resolverInstance->isCommandValid($commandName) === false) {
                        // Invalid command found
                        throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
                }