]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Fri, 24 Feb 2017 21:57:24 +0000 (22:57 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 28 Feb 2017 21:10:04 +0000 (22:10 +0100)
- add "import" for InvalidCommandException
- is<Action|Command|Controller>Valid() methods now have 2 parameters:
  $namespace and $fooName
- InvalidCommandException is no longer deprecated
- removed [EOF] and ?>

Signed-off-by: Roland Häder <roland@mxchange.org>
16 files changed:
application/tests/classes/controller/console/class_TestsConsoleDefaultNewsController.php
application/tests/classes/resolver/command/.htaccess [new file with mode: 0644]
application/tests/classes/resolver/command/console/.htaccess [new file with mode: 0644]
application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php [new file with mode: 0644]
application/tests/classes/resolver/controller/class_TestsConsoleControllerResolver.php
application/tests/config.php
inc/loader/class_ClassLoader.php
inc/main/classes/resolver/action/class_BaseActionResolver.php
inc/main/classes/resolver/command/class_BaseCommandResolver.php
inc/main/classes/resolver/command/console/class_ConsoleCommandResolver.php
inc/main/classes/resolver/command/html/class_HtmlCommandResolver.php
inc/main/classes/resolver/command/image/class_ImageCommandResolver.php
inc/main/classes/resolver/controller/class_BaseControllerResolver.php
inc/main/exceptions/class_FrameworkException.php
inc/main/exceptions/main/class_InvalidCommandException.php
inc/main/interfaces/resolver/commands/class_CommandResolver.php

index 266ee5424e0248dd9f2e8400b40b0decbd4c27c6..355fc53f021ff05ce11f0cfe1c45c561394259da 100644 (file)
@@ -140,7 +140,5 @@ class TestsConsoleDefaultNewsController extends BaseController implements Contro
        public function executeActivationFilters (Requestable $requestInstance, Responseable $responseInstance) {
                $this->executeFilters('activation', $requestInstance, $responseInstance);
        }
-}
 
-// [EOF]
-?>
+}
diff --git a/application/tests/classes/resolver/command/.htaccess b/application/tests/classes/resolver/command/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/tests/classes/resolver/command/console/.htaccess b/application/tests/classes/resolver/command/console/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php b/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php
new file mode 100644 (file)
index 0000000..c6c5c3c
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+// Own namespace
+namespace CoreFramework\Tests\Resolver\Command;
+
+// Import framework stuff
+use CoreFramework\Command\InvalidCommandException;
+use CoreFramework\Manager\ManageableApplication;
+use CoreFramework\Resolver\Command\BaseCommandResolver;
+use CoreFramework\Resolver\Command\CommandResolver;
+
+/**
+ * A command resolver for console commands
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class TestsConsoleCommandResolver extends BaseCommandResolver implements CommandResolver {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set prefix to "TestsConsole"
+               $this->setClassPrefix('tests_console');
+       }
+
+       /**
+        * Creates an instance of a TestsConsole command resolver with a given default command
+        *
+        * @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      InvalidCommandException         Thrown if default command is invalid
+        */
+       public static final function createTestsConsoleCommandResolver ($commandName, ManageableApplication $applicationInstance) {
+               // Create the new instance
+               $resolverInstance = new TestsConsoleCommandResolver();
+
+               // 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('CoreFramework\Tests\Command', $commandName) === FALSE) {
+                       // Invalid command found
+                       throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);
+               }
+
+               // Set the application instance
+               $resolverInstance->setApplicationInstance($applicationInstance);
+
+               // Return the prepared instance
+               return $resolverInstance;
+       }
+
+}
index f707e1f008c2b11b1472a9416f8059b1c234aad0..ad250cabf3d02dd87544b887e42e9f4cc8f26032 100644 (file)
@@ -108,7 +108,5 @@ class TestsConsoleControllerResolver extends BaseControllerResolver implements C
                // Return the maybe resolved instance
                return $controllerInstance;
        }
-}
 
-// [EOF]
-?>
+}
index c9653716506fe0cc7ea9691b086e8257f97800b2..f9ca6ea73143a2a633211596bfc4a3062ca74ad9 100644 (file)
@@ -35,3 +35,6 @@ $cfg->setConfigEntry('default_tests_console_command', 'main');
 
 // CFG: DEFAULT-TESTS-CONSOLE-CONTROLLER
 $cfg->setConfigEntry('default_tests_console_controller', 'main');
+
+// CFG: TESTS-CONSOLE-CMD-MAIN-RESOLVER-CLASS
+$cfg->setConfigEntry('tests_console_cmd_main_resolver_class', 'CoreFramework\Tests\Resolver\Command\TestsConsoleCommandResolver');
index eee9fce15e85d458920073785c1e5ce842a64216..0d0356e8d85a3f528e14839d6c1584afb7e5c350 100644 (file)
@@ -191,7 +191,7 @@ class ClassLoader {
         */
        public static function scanFrameworkClasses () {
                // Trace message
-               /* NOISY-DEBUG: */ printf('[%s:%d]: CALLED!' . PHP_EOL, __METHOD__, __LINE__);
+               //* NOISY-DEBUG: */ printf('[%s:%d]: CALLED!' . PHP_EOL, __METHOD__, __LINE__);
 
                // Cache loader instance
                $loaderInstance = self::getSelfInstance();
@@ -199,7 +199,7 @@ class ClassLoader {
                // Load all classes
                foreach (self::$frameworkPaths as $pathName) {
                        // Debug message
-                       /* NOISY-DEBUG: */ printf('[%s:%d]: pathName=%s' . PHP_EOL, __METHOD__, __LINE__, $pathName);
+                       //* NOISY-DEBUG: */ printf('[%s:%d]: pathName=%s' . PHP_EOL, __METHOD__, __LINE__, $pathName);
 
                        // Try to load the framework classes
                        $loaderInstance->scanClassPath('inc/main/' . $pathName . '/');
@@ -213,7 +213,7 @@ class ClassLoader {
         */
        public static function scanApplicationClasses () {
                // Trace message
-               /* NOISY-DEBUG: */ printf('[%s:%d]: CALLED!' . PHP_EOL, __METHOD__, __LINE__);
+               //* NOISY-DEBUG: */ printf('[%s:%d]: CALLED!' . PHP_EOL, __METHOD__, __LINE__);
 
                // Get config instance
                $cfg = FrameworkConfiguration::getSelfInstance();
@@ -224,7 +224,7 @@ class ClassLoader {
                        $pathName = sprintf('%s/%s/%s', $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $class);
 
                        // Debug message
-                       /* NOISY-DEBUG: */ printf('[%s:%d]: pathName=%s' . PHP_EOL, __METHOD__, __LINE__, $pathName);
+                       //* NOISY-DEBUG: */ printf('[%s:%d]: pathName=%s' . PHP_EOL, __METHOD__, __LINE__, $pathName);
 
                        // Is the path readable?
                        if (is_dir($pathName)) {
@@ -351,7 +351,7 @@ class ClassLoader {
                }
 
                // Get a new iterator
-               /* NOISY-DEBUG: */ printf('[%s:%d] basePath=%s' . PHP_EOL, __METHOD__, __LINE__, $basePath);
+               //* NOISY-DEBUG: */ printf('[%s:%d] basePath=%s' . PHP_EOL, __METHOD__, __LINE__, $basePath);
                $iteratorInstance = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basePath), RecursiveIteratorIterator::CHILD_FIRST);
 
                // Load all entries
@@ -371,23 +371,23 @@ class ClassLoader {
                                $iteratorInstance->next();
 
                                // Skip non-file entries
-                               /* NOISY-DEBUG: */ printf('[%s:%d] SKIP: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                               //* NOISY-DEBUG: */ printf('[%s:%d] SKIP: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                                continue;
                        } // END - if
 
                        // Is this file wanted?
-                       /* NOISY-DEBUG: */ printf('[%s:%d] FOUND: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                       //* NOISY-DEBUG: */ printf('[%s:%d] FOUND: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                        if ((substr($fileName, 0, strlen($this->prefix)) == $this->prefix) && (substr($fileName, -strlen($this->suffix), strlen($this->suffix)) == $this->suffix)) {
                                // Add it to the list
-                               /* NOISY-DEBUG: */ printf('[%s:%d] ADD: %s,fqfn=%s' . PHP_EOL, __METHOD__, __LINE__, $fileName, $fqfn);
+                               //* NOISY-DEBUG: */ printf('[%s:%d] ADD: %s,fqfn=%s' . PHP_EOL, __METHOD__, __LINE__, $fileName, $fqfn);
                                $this->foundClasses[$fileName] = $fqfn;
                        } else {
                                // Not added
-                               /* NOISY-DEBUG: */ printf('[%s:%d] NOT ADDED: %s,fqfn=%s' . PHP_EOL, __METHOD__, __LINE__, $fileName, $fqfn);
+                               //* NOISY-DEBUG: */ printf('[%s:%d] NOT ADDED: %s,fqfn=%s' . PHP_EOL, __METHOD__, __LINE__, $fileName, $fqfn);
                        }
 
                        // Advance to next entry
-                       /* NOISY-DEBUG: */ printf('[%s:%d] NEXT: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                       //* NOISY-DEBUG: */ printf('[%s:%d] NEXT: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                        $iteratorInstance->next();
                } // END - while
        }
@@ -427,7 +427,7 @@ class ClassLoader {
         */
        private function loadClassFile ($className) {
                // Trace message
-               /* NOISY-DEBUG: */ printf('[%s:%d] className=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $className);
+               //* NOISY-DEBUG: */ printf('[%s:%d] className=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $className);
 
                // The class name should contain at least 2 back-slashes, so split at them
                $classNameParts = explode("\\", $className);
@@ -445,12 +445,12 @@ class ClassLoader {
                $fileName = $this->prefix . $shortClassName . $this->suffix;
 
                // Now look it up in our index
-               /* NOISY-DEBUG: */ printf('[%s:%d] ISSET: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+               //* NOISY-DEBUG: */ printf('[%s:%d] ISSET: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                if ((isset($this->foundClasses[$fileName])) && (!isset($this->loadedClasses[$this->foundClasses[$fileName]]))) {
                        // File is found and not loaded so load it only once
-                       /* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - START' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                       //* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - START' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                        require($this->foundClasses[$fileName]);
-                       /* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - END' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                       //* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - END' . PHP_EOL, __METHOD__, __LINE__, $fileName);
 
                        // Count this loaded class/interface/exception
                        $this->total++;
@@ -459,18 +459,18 @@ class ClassLoader {
                        $this->loadedClasses[$this->foundClasses[$fileName]] = TRUE;
 
                        // Remove it from classes list so it won't be found twice.
-                       /* NOISY-DEBUG: */ printf('[%s:%d] UNSET: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                       //* NOISY-DEBUG: */ printf('[%s:%d] UNSET: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                        unset($this->foundClasses[$fileName]);
 
                        // Developer mode excludes caching (better debugging)
                        if (!defined('DEVELOPER')) {
                                // Reset cache
-                               /* NOISY-DEBUG: */ printf('[%s:%d] classesCached=FALSE' . PHP_EOL, __METHOD__, __LINE__);
+                               //* NOISY-DEBUG: */ printf('[%s:%d] classesCached=FALSE' . PHP_EOL, __METHOD__, __LINE__);
                                $this->classesCached = FALSE;
                        } // END - if
                } else {
                        // Not found
-                       /* NOISY-DEBUG: */ printf('[%s:%d] 404: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                       //* NOISY-DEBUG: */ printf('[%s:%d] 404: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                }
        }
 
@@ -485,12 +485,12 @@ class ClassLoader {
                        // Is this a config?
                        if (substr($fileName, 0, strlen($this->prefix)) == $this->prefix) {
                                // Then include it
-                               /* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - START' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                               //* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - START' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                                require($fqfn);
-                               /* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - END' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                               //* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - END' . PHP_EOL, __METHOD__, __LINE__, $fileName);
 
                                // Remove it from the list
-                               /* NOISY-DEBUG: */ printf('[%s:%d] UNSET: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
+                               //* NOISY-DEBUG: */ printf('[%s:%d] UNSET: %s' . PHP_EOL, __METHOD__, __LINE__, $fileName);
                                unset($this->foundClasses[$fileName]);
                        } // END - if
                } // END - foreach
index 0c4841b6a04cba3c91d63ca47239c8a4c7141477..45ec44c81071295c9592ee9d35c52fd0fbbb05cc 100644 (file)
@@ -67,22 +67,31 @@ class BaseActionResolver extends BaseResolver {
        /**
         * Checks whether the given action is valid
         *
-        * @param       $actionName     The default action we shall execute
+        * @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
         */
-       public function isActionValid ($actionName) {
+       public function isActionValid ($namespace, $actionName) {
                // By default nothing shall be valid
                $isValid = FALSE;
 
                // Is a action set?
-               if (empty($actionName)) {
+               if (empty($namespace)) {
+                       // Then thrown an exception here
+                       throw new EmptyVariableException(array($this, 'namespace'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+               } elseif (empty($actionName)) {
                        // Then thrown an exception here
                        throw new EmptyVariableException(array($this, 'actionName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
                } // END - if
 
                // Create class name
-               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($actionName) . 'Action';
+               $className = sprintf(
+                       '%s\%s%sAction',
+                       $namespace,
+                       $this->getCapitalizedClassPrefix(),
+                       self::convertToClassName($actionName)
+               );
 
                // Now, let us create the full name of the action class
                $this->setClassName($className);
@@ -109,8 +118,13 @@ class BaseActionResolver extends BaseResolver {
                // Init action instance
                $actionInstance = NULL;
 
-               // Create action class name
-               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($this->getActionName()) . 'Action';
+               // Create class name
+               $className = sprintf(
+                       '%s\%s%sAction',
+                       $this->getNamespace(),
+                       $this->getCapitalizedClassPrefix(),
+                       self::convertToClassName($actionName)
+               );
 
                // ... and set it
                $this->setClassName($className);
index 730e28220a2b9e20d487303329dd53d72e9290a2..5f948a56ad4d84335c5a709ddbf4f7d1946681a6 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 // Own namespace
-namespace CoreFramework\Resolver\Controller;
+namespace CoreFramework\Resolver\Command;
 
 // Import framework stuff
+use CoreFramework\Command\InvalidCommandException;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Request\Requestable;
 use CoreFramework\Resolver\BaseResolver;
@@ -54,7 +55,12 @@ class BaseCommandResolver extends BaseResolver {
                $commandInstance = NULL;
 
                // Create class name
-               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($commandName) . 'Command';
+               $className = sprintf(
+                       '%s\%s%sCommand',
+                       $this->getNamespace(),
+                       $this->getCapitalizedClassPrefix(),
+                       self::convertToClassName($commandName)
+               );
 
                // Create command class name
                $this->setClassName($className);
@@ -150,22 +156,31 @@ class BaseCommandResolver extends BaseResolver {
        /**
         * Checks whether the given command is valid
         *
+        * @param       $namespace              Namespace to look in
         * @param       $commandName    The default command we shall execute
         * @return      $isValid                Whether the given command is valid
         * @throws      EmptyVariableException  Thrown if given command is not set
         */
-       public function isCommandValid ($commandName) {
+       protected function isCommandValid ($namespace, $commandName) {
                // By default nothing shall be valid
                $isValid = FALSE;
 
-               // Is a command set?
-               if (empty($commandName)) {
+               // Is namespace and command name set?
+               if (empty($namespace)) {
+                       // Then thrown an exception here
+                       throw new EmptyVariableException(array($this, 'namespace'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+               } elseif (empty($commandName)) {
                        // Then thrown an exception here
                        throw new EmptyVariableException(array($this, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
                } // END - if
 
                // Create the full class name
-               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($commandName) . 'Command';
+               $className = sprintf(
+                       '%s\%s%sCommand',
+                       $namespace,
+                       $this->getCapitalizedClassPrefix(),
+                       self::convertToClassName($commandName)
+               );
 
                // Now, let us create the full name of the command class
                $this->setClassName($className);
index 42ac4c753744a0ee64495cd30e60328c1bdbe385..7a06feb85fb4e80031866d0e1f10934763e9a656 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Resolver\Command;
 
 // Import framework stuff
+use CoreFramework\Command\InvalidCommandException;
 use CoreFramework\Manager\ManageableApplication;
 
 /**
index ce20802b61936cbf4d21a28d0188a83444c370f6..adc10cbeaae25ee40adda608bba7aa27ef2f2cb4 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Resolver\Command;
 
 // Import framework stuff
+use CoreFramework\Command\InvalidCommandException;
 use CoreFramework\Manager\ManageableApplication;
 
 /**
index 4a473b523280e47e43a8c6e8df5a08a7299b55e6..8d19319b9f4dfb9d29a60b552be450b5255a5da6 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Resolver\Command;
 
 // Import framework stuff
+use CoreFramework\Command\InvalidCommandException;
 use CoreFramework\Manager\ManageableApplication;
 
 /**
index 3d3188978eb26655a78da3de0ba308774c666f88..6f2da6fe4d2f174726b4dd8481b0c9a1bb3d4c6b 100644 (file)
@@ -73,7 +73,12 @@ class BaseControllerResolver extends BaseResolver {
                //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BEFORE: controller=' . $controllerName);
                if ($controllerName != $defaultController) {
                        // Create controller class name
-                       $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($controllerName) . 'Controller';
+                       $className = sprintf(
+                               '%s\%s%sController',
+                               $namespace,
+                               $this->getCapitalizedClassPrefix(),
+                               self::convertToClassName($controllerName)
+                       );
 
                        // ... and set it
                        $this->setClassName($className);
@@ -124,7 +129,7 @@ class BaseControllerResolver extends BaseResolver {
         * @throws      EmptyVariableException          Thrown if given controller is not set
         * @throws      DefaultControllerException      Thrown if default controller was not found
         */
-       public function isControllerValid ($namespace, $controllerName) {
+       protected function isControllerValid ($namespace, $controllerName) {
                // By default nothing shall be valid
                $isValid = FALSE;
 
index 454c1028e888d3f9a8cc9192d58f0a22a0fe9acb..866e59f7d0b2f028ed5c7b84cebd34be6ab1dfbe 100644 (file)
@@ -61,7 +61,8 @@ abstract class FrameworkException extends ReflectionException {
                // In emergency exit?
                if (defined('EMERGENCY_EXIT_CALLED')) {
                        // Output message
-                       printf("[%s:] Message: %s, Backtrace: <pre>%s</pre>",
+                       printf(
+                               '[%s:] Message: %s, Backtrace: <pre>%s</pre>',
                                $this->__toString(),
                                $message,
                                $this->getPrintableBackTrace()
@@ -74,7 +75,8 @@ abstract class FrameworkException extends ReflectionException {
                // Should we log exceptions? (bad implementation)
                if (defined('LOG_EXCEPTIONS')) {
                        // Log the error
-                       error_log(sprintf("[%s:] %s (%s)",
+                       error_log(sprintf(
+                               '[%s:] %s (%s)',
                                $this->__toString(),
                                $message,
                                $this->getHexCode()
index d4982fd7040ef9f115e9d22f5e62ef025762cd36..274ba81cb04ca3eb0d74d57f9bc5412f1e3ee650 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Own namespace
-namespace CoreFramework\Deprecated;
+namespace CoreFramework\Command;
 
 // Import framework stuff
 use CoreFramework\Generic\FrameworkException;
@@ -13,7 +13,6 @@ use CoreFramework\Generic\FrameworkException;
  * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
- * @deprecated Don't use this anymore
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 71203a1f473c615aa1e99fb06c1e9eb12c1f51f2..5d5ca170befe761749b5f348896e3028072bfae9 100644 (file)
@@ -37,13 +37,4 @@ interface CommandResolver extends Resolver {
         */
        function resolveCommandByRequest (Requestable $requestInstance);
 
-       /**
-        * Checks whether the given command is valid
-        *
-        * @param       $commandName    The default command we shall execute
-        * @return      $isValid                Whether the given command is valid
-        * @throws      EmptyVariableException  Thrown if given command is not set
-        */
-       function isCommandValid ($commandName);
-
 }