*/
private $commandPrefix = "";
+ /**
+ * A controller instance
+ */
+ private $controllerInstance = null;
+
/**
* Protected constructor
*
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
*
// 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?
$isValid = true;
}
+ // Debug output
+ //echo "<strong>----- ".__METHOD__." -----</strong><br />\n";
+ //print($class."<pre>");
+ //debug_print_backtrace();
+ //var_dump($isValid);
+ //print("</pre>");
+
// Set command name
$this->setCommandName($commandName);