]> git.mxchange.org Git - core.git/blobdiff - framework/main/interfaces/resolver/commands/class_CommandResolver.php
Continued:
[core.git] / framework / main / interfaces / resolver / commands / class_CommandResolver.php
index b8d4b55a29428064fc04c71938378cad03321499..73100caf868db804a56d5536150af72b7549a712 100644 (file)
@@ -30,11 +30,31 @@ use Org\Mxchange\CoreFramework\Resolver\Resolver;
  */
 interface CommandResolver extends Resolver {
        /**
-        * Returns an command instance for a given request class
+        * Getter for command name
+        *
+        * @return      $commandName    Last validated command name
+        */
+       function getCommandName ();
+
+       /**
+        * Returns an command instance for a given request class or null if
+        * it was not found
         *
         * @param       $requestInstance        An instance of a Requestable class
         * @return      $commandInstance        An instance of the resolved command
+        * @throws      InvalidCommandException         Thrown if $commandName is invalid
+        * @throws      UnexpectedValueException        Thrown if $commandInstance is an invalid instance
         */
        function resolveCommandByRequest (Requestable $requestInstance);
 
+       /**
+        * Resolves the command by its direct name and returns an instance of its class
+        *
+        * @param       $namespace                      Namespace to look in
+        * @param       $commandName            The direct command name we shall resolve
+        * @return      $commandInstance        An instance of the command class
+        * @throws      InvalidCommandException         Thrown if $commandName is invalid
+        */
+       function resolveCommand (string $namespace, string $commandName);
+
 }