]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/resolver/command/class_BaseCommandResolver.php
Opps, forgot this.
[core.git] / inc / classes / main / resolver / command / class_BaseCommandResolver.php
index 0994bf168f5385f0899ec765edbcdb447b50945e..ff444fd725a8e3c226a0df6d03564086d01fdbfc 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseCommandResolver extends BaseResolver {
-       /**
-        * Validated command name
-        */
-       private $commandName = '';
-
        /**
         * Protected constructor
         *
@@ -38,25 +33,6 @@ class BaseCommandResolver extends BaseResolver {
                parent::__construct($className);
        }
 
-       /**
-        * Setter for command name
-        *
-        * @param       $commandName    Last validated command name
-        * @return      void
-        */
-       protected final function setCommandName ($commandName) {
-               $this->commandName = $commandName;
-       }
-
-       /**
-        * Getter for command name
-        *
-        * @return      $commandName    Last validated command name
-        */
-       protected final function getCommandName () {
-               return $this->commandName;
-       }
-
        /**
         * "Loads" a given command and instances it if not yet cached
         *
@@ -70,7 +46,7 @@ class BaseCommandResolver extends BaseResolver {
                $commandInstance = NULL;
 
                // Create class name
-               $className = $this->getCapitalizedClassPrefix() . $this->convertToClassName($commandName) . 'Command';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($commandName) . 'Command';
 
                // Create command class name
                $this->setClassName($className);
@@ -109,7 +85,7 @@ class BaseCommandResolver extends BaseResolver {
 
                // Is the command empty? Then fall back to default command
                if (empty($commandName)) {
-                       $commandName = $this->getConfigInstance()->getConfigEntry('default_html_command');
+                       $commandName = $this->getConfigInstance()->getConfigEntry('default_' . self::getResponseTypeFromSystem() . '_command');
                } // END - if
 
                // Check if command is valid
@@ -147,7 +123,7 @@ class BaseCommandResolver extends BaseResolver {
 
                // Is the command empty? Then fall back to default command
                if (empty($commandName)) {
-                       $commandName = $this->getConfigInstance()->getConfigEntry('default_html_command');
+                       $commandName = $this->getConfigInstance()->getConfigEntry('default_' . self::getResponseTypeFromSystem() . '_command');
                } // END - if
 
                // Check if command is valid
@@ -181,7 +157,7 @@ class BaseCommandResolver extends BaseResolver {
                } // END - if
 
                // Create the full class name
-               $className = $this->getCapitalizedClassPrefix() . $this->convertToClassName($commandName) . 'Command';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($commandName) . 'Command';
 
                // Now, let us create the full name of the command class
                $this->setClassName($className);