]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/resolver/state/class_BaseStateResolver.php
Updated to latest 'core' + convertToClassName() and convertDashesToUnderscores()...
[hub.git] / application / hub / main / resolver / state / class_BaseStateResolver.php
index 97995e271897923f86193bb62189f847b4b023d6..8744b71560d698236159d83a38fd53bdadfeb422 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A generic state 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 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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
@@ -96,7 +96,7 @@ class BaseStateResolver extends BaseResolver {
                $stateInstance = NULL;
 
                // Create state class name
-               $className = $this->getStatePrefix() . '' . $this->convertToClassName($stateName) . 'State';
+               $className = $this->getStatePrefix() . '' . self::convertToClassName($stateName) . 'State';
 
                // ... and set it
                $this->setClassName($className);
@@ -127,7 +127,7 @@ class BaseStateResolver extends BaseResolver {
         */
        public function isStateValid ($stateName) {
                // By default nothing shall be valid
-               $isValid = false;
+               $isValid = FALSE;
 
                // Is a state set?
                if (empty($stateName)) {
@@ -136,17 +136,17 @@ class BaseStateResolver extends BaseResolver {
                } // END - if
 
                // Create class name
-               $className = $this->statePrefix . $this->convertToClassName($stateName) . 'State';
+               $className = $this->statePrefix . self::convertToClassName($stateName) . 'State';
 
                // Now, let us create the full name of the state class
                $this->setClassName($className);
 
                // Try it hard to get an state
-               while ($isValid === false) {
+               while ($isValid === FALSE) {
                        // Is this class already loaded?
                        if (class_exists($this->getClassName())) {
                                // This class does exist. :-)
-                               $isValid = true;
+                               $isValid = TRUE;
                        } elseif ($this->getClassName() != $this->statePrefix . 'DefaultState') {
                                // Set default state
                                $this->setClassName($this->statePrefix . 'DefaultState');