]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php
'public static final' is correct
[shipsimu.git] / application / ship-simu / main / resolver / web / class_WebGovernmentFailedCommandResolver.php
index 9e69db6a2281514faaa200e3718ebf0b275b08ed..c26494a78ecdca0b29cfac103bf0ceafc03f10fc 100644 (file)
@@ -37,7 +37,7 @@ class WebGovernmentFailedCommandResolver extends BaseCommandResolver implements
                parent::__construct(__CLASS__);
 
                // Set prefix to "Web"
-               $this->setCommandPrefix("Web");
+               $this->setCommandPrefix('Web');
        }
 
        /**
@@ -49,7 +49,7 @@ class WebGovernmentFailedCommandResolver extends BaseCommandResolver implements
         * @throws      EmptyVariableException          Thrown if default command is not set
         * @throws      InvalidInterfaceException       Thrown if command does not implement interface Commandable
         */
-       public final static function createWebGovernmentFailedCommandResolver ($commandName, ManageableApplication $appInstance) {
+       public static final function createWebGovernmentFailedCommandResolver ($commandName, ManageableApplication $appInstance) {
                // Create the new instance
                $resolverInstance = new WebGovernmentFailedCommandResolver();
 
@@ -97,7 +97,7 @@ class WebGovernmentFailedCommandResolver extends BaseCommandResolver implements
                } // END - if
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_web_command');
 
                // Check if command is valid
                if ($this->isCommandValid($commandName) === false) {
@@ -133,7 +133,7 @@ class WebGovernmentFailedCommandResolver extends BaseCommandResolver implements
                $commandInstance = null;
 
                // Is the command empty? Then fall back to default command
-               if (empty($commandName)) $commandName = $this->getConfigInstance()->readConfig('default_web_command');
+               if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_web_command');
 
                // Check if command is valid
                if ($this->isCommandValid($commandName) === false) {
@@ -158,13 +158,14 @@ class WebGovernmentFailedCommandResolver extends BaseCommandResolver implements
         */
        private function loadCommand ($commandName) {
                // Cache default command
-               $defaultCommand = $this->getConfigInstance()->readConfig('default_web_command');
+               $defaultCommand = $this->getConfigInstance()->getConfigEntry('default_web_command');
 
                // Init command instance
                $commandInstance = null;
 
                // Create command class name
-               $this->setClassName(sprintf("Web%sCommand",
+               $this->setClassName(sprintf("%s%sCommand",
+                       $this->getCommandPrefix(),
                        $this->convertToClassName($commandName)
                ));