]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/resolver/controller/class_BaseControllerResolver.php
Updated domain without a dash :(
[core.git] / inc / classes / main / resolver / controller / class_BaseControllerResolver.php
index 176fa793dfe89b44efa3d9dd6fd8330bb7b55bbc..020438f133ed4cfcef02898fee873662ddb9ca17 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A generic controller 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 - 2012 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
@@ -60,7 +60,7 @@ class BaseControllerResolver extends BaseResolver {
        /**
         * "Loads" a given controller and instances it if not yet cached. If the
         * controller was not found one of the default controllers will be used
-        * depending on wether news shall be displayed.
+        * depending on whether news shall be displayed.
         *
         * @param       $controllerName                 A controller name we shall look for
         * @return      $controllerInstance             A loaded controller instance
@@ -78,7 +78,7 @@ class BaseControllerResolver extends BaseResolver {
                $this->setClassName($this->getClassPrefix() . 'DefaultNewsController');
 
                // Generate the class name
-               //* DEBUG: */ $this->debugOutput('BEFORE: controller=' . $controllerName);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BEFORE: controller=' . $controllerName);
                if ($controllerName != $defaultController) {
                        // Create controller class name
                        $className = $this->getClassPrefix() . $this->convertToClassName($controllerName) . 'Controller';
@@ -89,7 +89,7 @@ class BaseControllerResolver extends BaseResolver {
                        // No news at main command or non-news command
                        $this->setClassName($this->getClassPrefix() . 'DefaultNewsController');
                }
-               //* DEBUG: */ $this->debugOutput('AFTER: controller=' . $this->getClassName());
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('AFTER: controller=' . $this->getClassName());
 
                // Is this class loaded?
                if (!class_exists($this->getClassName())) {
@@ -124,16 +124,16 @@ class BaseControllerResolver extends BaseResolver {
        }
 
        /**
-        * Checks wether the given controller is valid
+        * Checks whether the given controller is valid
         *
         * @param       $controllerName         The default controller we shall execute
-        * @return      $isValid                        Wether the given controller is valid
+        * @return      $isValid                        Whether the given controller is valid
         * @throws      EmptyVariableException          Thrown if given controller is not set
         * @throws      DefaultControllerException      Thrown if default controller was not found
         */
        public function isControllerValid ($controllerName) {
                // By default nothing shall be valid
-               $isValid = false;
+               $isValid = FALSE;
 
                // Is a controller set?
                if (empty($controllerName)) {
@@ -148,11 +148,11 @@ class BaseControllerResolver extends BaseResolver {
                $this->setClassName($className);
 
                // Try it hard to get an controller
-               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->getClassPrefix() . 'DefaultNewsController') {
                                // Set default controller
                                $this->setClassName($this->getClassPrefix() . 'DefaultNewsController');