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 266ee54..355fc53 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 f707e1f..ad250ca 100644 (file)
@@ -108,7 +108,5 @@ class TestsConsoleControllerResolver extends BaseControllerResolver implements C
                // Return the maybe resolved instance
                return $controllerInstance;
        }
-}
 
-// [EOF]
-?>
+}
index c965371..f9ca6ea 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 eee9fce..0d0356e 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 0c4841b..45ec44c 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 730e282..5f948a5 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 42ac4c7..7a06feb 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Resolver\Command;
 
 // Import framework stuff
+use CoreFramework\Command\InvalidCommandException;
 use CoreFramework\Manager\ManageableApplication;
 
 /**
index ce20802..adc10cb 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Resolver\Command;
 
 // Import framework stuff
+use CoreFramework\Command\InvalidCommandException;
 use CoreFramework\Manager\ManageableApplication;
 
 /**
index 4a473b5..8d19319 100644 (file)
@@ -3,6 +3,7 @@
 namespace CoreFramework\Resolver\Command;
 
 // Import framework stuff
+use CoreFramework\Command\InvalidCommandException;
 use CoreFramework\Manager\ManageableApplication;
 
 /**
index 3d31889..6f2da6f 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 454c102..866e59f 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 d4982fd..274ba81 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 71203a1..5d5ca17 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);
-
 }