]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/resolver/action/class_BaseActionResolver.php
Method convertToClassName() and convertDashesToUnderscores() are now static as
[core.git] / inc / classes / main / resolver / action / class_BaseActionResolver.php
index d7d309cd21e6c70878844955c2bb5dbfbfa79a1e..44836e9d52be1000b3b51f6c4097f78a448f11d4 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A generic action resolver class
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @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
@@ -58,15 +58,15 @@ class BaseActionResolver extends BaseResolver {
        }
 
        /**
-        * Checks wether the given action is valid
+        * Checks whether the given action is valid
         *
         * @param       $actionName     The default action we shall execute
-        * @return      $isValid                Wether the given action is valid
+        * @return      $isValid                Whether the given action is valid
         * @throws      EmptyVariableException  Thrown if given action is not set
         */
        public function isActionValid ($actionName) {
                // By default nothing shall be valid
-               $isValid = false;
+               $isValid = FALSE;
 
                // Is a action set?
                if (empty($actionName)) {
@@ -75,7 +75,7 @@ class BaseActionResolver extends BaseResolver {
                } // END - if
 
                // Create class name
-               $className = $this->getClassPrefix() . $this->convertToClassName($actionName) . 'Action';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($actionName) . 'Action';
 
                // Now, let us create the full name of the action class
                $this->setClassName($className);
@@ -83,7 +83,7 @@ class BaseActionResolver extends BaseResolver {
                // Is this class already loaded?
                if (class_exists($this->getClassName())) {
                        // This class does exist. :-)
-                       $isValid = true;
+                       $isValid = TRUE;
                } // END - if
 
                // Set action name
@@ -103,7 +103,7 @@ class BaseActionResolver extends BaseResolver {
                $actionInstance = NULL;
 
                // Create action class name
-               $className = $this->getClassPrefix() . $this->convertToClassName($this->getActionName()) . 'Action';
+               $className = $this->getCapitalizedClassPrefix() . self::convertToClassName($this->getActionName()) . 'Action';
 
                // ... and set it
                $this->setClassName($className);