X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fresolver%2Fclass_BaseResolver.php;h=9345109a8ac24b99b46e841dc6daf41cd6cd7f60;hb=12a993738a1d1bea29a886e06478beb145c275e5;hp=d947d89e318df1e89495e419d8d9f3fa06088edb;hpb=375d32104957e2401b7d2d5d20a48b32abc75831;p=hub.git
diff --git a/inc/classes/main/resolver/class_BaseResolver.php b/inc/classes/main/resolver/class_BaseResolver.php
index d947d89e3..9345109a8 100644
--- a/inc/classes/main/resolver/class_BaseResolver.php
+++ b/inc/classes/main/resolver/class_BaseResolver.php
@@ -32,6 +32,11 @@ class BaseResolver extends BaseFrameworkSystem {
*/
private $commandPrefix = "";
+ /**
+ * A controller instance
+ */
+ private $controllerInstance = null;
+
/**
* Protected constructor
*
@@ -42,9 +47,29 @@ class BaseResolver extends BaseFrameworkSystem {
parent::__construct($class);
// Clean up a little
+ $this->removeNumberFormaters();
$this->removeSystemArray();
}
+ /**
+ * Setter for controller instance (this surely breaks a bit the MVC patterm)
+ *
+ * @param $controllerInstance An instance of the controller
+ * @return void
+ */
+ public final function setControllerInstance (Controller $controllerInstance) {
+ $this->controllerInstance = $controllerInstance;
+ }
+
+ /**
+ * Getter for controller instance (this surely breaks a bit the MVC patterm)
+ *
+ * @return $controllerInstance An instance of the controller
+ */
+ public final function getControllerInstance () {
+ return $this->controllerInstance;
+ }
+
/**
* Setter for command name
*
@@ -94,7 +119,7 @@ class BaseResolver extends BaseFrameworkSystem {
// Now, let us create the full name of the command class
$class = sprintf("%s%sCommand",
$this->commandPrefix,
- ucfirst(strtolower($commandName))
+ $this->convertToClassName($commandName)
);
// Is this class already loaded?
@@ -103,6 +128,13 @@ class BaseResolver extends BaseFrameworkSystem {
$isValid = true;
}
+ // Debug output
+ //echo "----- ".__METHOD__." -----
\n";
+ //print($class."
"); + //debug_print_backtrace(); + //var_dump($isValid); + //print(""); + // Set command name $this->setCommandName($commandName);