Continued:
[core.git] / framework / main / interfaces / resolver / commands / class_CommandResolver.php
index 87f56a60a93260665b5d4b5d9a33c101af5a7de1..0d1e1c5ae64e2a82eda33af08390a2cd0c44c149 100644 (file)
@@ -11,7 +11,7 @@ use Org\Mxchange\CoreFramework\Resolver\Resolver;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 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
  *
@@ -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);
+
 }