]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php
resolveController() was everywhere the same, still you can overwrite it with
[core.git] / inc / classes / main / resolver / controller / console / class_ConsoleControllerResolver.php
index 3eb6c21010ca67b70344d077e3879142111d8b16..418a6e2a6eb24d84dac463c56d0d1094211372cc 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class ConsoleControllerResolver extends BaseControllerResolver implements ControllerResolver {
-       /**
-        * Last successfull resolved controller (name)
-        */
-       private $lastControllerName = '';
-
-       /**
-        * Last successfull resolved controller (instance)
-        */
-       private $lastControllerInstance = NULL;
-
        /**
         * Protected constructor
         *
@@ -42,7 +32,7 @@ class ConsoleControllerResolver extends BaseControllerResolver implements Contro
                parent::__construct(__CLASS__);
 
                // Set prefix to "Console"
-               $this->setClassPrefix('Console');
+               $this->setClassPrefix('console');
        }
 
        /**
@@ -76,38 +66,6 @@ class ConsoleControllerResolver extends BaseControllerResolver implements Contro
                // Return the prepared instance
                return $resolverInstance;
        }
-
-       /**
-        * Resolves the default controller of the given command
-        *
-        * @return      $controllerInstance             A controller instance for the default
-        *                                                                      command
-        * @throws      InvalidControllerInstanceException      Thrown if $controllerInstance
-        *                                                                                              is invalid
-        */
-       public function resolveController () {
-               // Init variables
-               $controllerName = '';
-               $controllerInstance = NULL;
-
-               // Get the command name 
-               $controllerName = $this->getControllerName();
-
-               // Get the command
-               $controllerInstance = $this->loadController($controllerName);
-
-               // And validate it
-               if ((!is_object($controllerInstance)) || (!$controllerInstance instanceof Controller)) {
-                       // This command has an invalid instance!
-                       throw new InvalidControllerInstanceException(array($this, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
-               } // END - if
-
-               // Set last controller
-               $this->setResolvedInstance($controllerInstance);
-
-               // Return the maybe resolved instance
-               return $controllerInstance;
-       }
 }
 
 // [EOF]