resolveController() was everywhere the same, still you can overwrite it with
authorRoland Haeder <roland@mxchange.org>
Mon, 6 Apr 2015 22:40:10 +0000 (00:40 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 6 Apr 2015 22:40:10 +0000 (00:40 +0200)
your own implementation.

Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/resolver/controller/class_BaseControllerResolver.php
inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php
inc/classes/main/resolver/controller/html/class_HtmlControllerResolver.php
inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php

index 14db8c3e25ca02aa54a77093023c0aeade06897c..b9ae868f6fe732367fb1ceb1239427a3924bd3c2 100644 (file)
@@ -141,6 +141,38 @@ class BaseControllerResolver extends BaseResolver {
                // Return the result
                return $isValid;
        }
                // Return the result
                return $isValid;
        }
+
+       /**
+        * 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]
 }
 
 // [EOF]
index 4298385fdb27f99d7db2204d76c067b028496077..418a6e2a6eb24d84dac463c56d0d1094211372cc 100644 (file)
@@ -66,38 +66,6 @@ class ConsoleControllerResolver extends BaseControllerResolver implements Contro
                // Return the prepared instance
                return $resolverInstance;
        }
                // 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]
 }
 
 // [EOF]
index 8e05d454b54d0d6d0241e201f1269a4e6cbc0c0d..20e101cf5ec65a205d55e4ab80068a812b464263 100644 (file)
@@ -66,38 +66,6 @@ class HtmlControllerResolver extends BaseControllerResolver implements Controlle
                // Return the prepared instance
                return $resolverInstance;
        }
                // 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]
 }
 
 // [EOF]
index ef8ff23a4f540871132b62aa6f135a08cb4f4f0d..dde5f036217dca8eabf6732e959ade1b88db0ab8 100644 (file)
@@ -31,8 +31,8 @@ class ImageControllerResolver extends BaseControllerResolver implements Controll
                // Call parent constructor
                parent::__construct(__CLASS__);
 
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Set prefix to 'Image'
-               $this->setClassPrefix('8mage');
+               // Set prefix to 'image'
+               $this->setClassPrefix('image');
        }
 
        /**
        }
 
        /**
@@ -66,38 +66,6 @@ class ImageControllerResolver extends BaseControllerResolver implements Controll
                // Return the prepared instance
                return $resolverInstance;
        }
                // 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]
 }
 
 // [EOF]