X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Fresolver%2Fweb%2Fclass_WebGovernmentFailedCommandResolver.php;h=c26494a78ecdca0b29cfac103bf0ceafc03f10fc;hp=9e69db6a2281514faaa200e3718ebf0b275b08ed;hb=b3d612dc053c999af135677df431f73d9d26154f;hpb=2b7c3e43b2fe0f3c5ae0455d13fa7743b638049f diff --git a/application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php b/application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php index 9e69db6..c26494a 100644 --- a/application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php +++ b/application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php @@ -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) ));