* controller class is missing (bad!)
*/
protected function loadController ($controllerName) {
- // Cache default command
+ // Cache default controller
$defaultController = $this->getConfigInstance()->getConfigEntry('default_' . strtolower($this->getClassPrefix()) . '_controller');
// Init controller instance
// ... and set it
$this->setClassName($className);
} else {
- // No news at main command or non-news command
+ // No news at main controller or non-news controller
$this->setClassName($this->getCapitalizedClassPrefix() . 'DefaultNewsController');
}
//* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('AFTER: controller=' . $this->getClassName());
// Try to read a config entry for our resolver including controller name... ;-)
$resolverConfigEntry = sprintf('%s_cmd_%s_resolver_class', strtolower($this->getClassPrefix()), strtolower($controllerName));
- // Get the config, this will throw an exception if there is no special command resolver
+ // Get the config, this will throw an exception if there is no special controller resolver
$resolverClass = $this->getConfigInstance()->getConfigEntry($resolverConfigEntry);
// Initiate the resolver and controller
}
/**
- * Resolves the default controller of the given command
+ * Resolves the default controller of the given controller
*
* @return $controllerInstance A controller instance for the default
- * command
+ * controller
* @throws InvalidControllerInstanceException Thrown if $controllerInstance
* is invalid
*/
$controllerName = '';
$controllerInstance = NULL;
- // Get the command name
+ // Get the controller name
$controllerName = $this->getControllerName();
- // Get the command
+ // Get the controller
$controllerInstance = $this->loadController($controllerName);
// And validate it
if ((!is_object($controllerInstance)) || (!$controllerInstance instanceof Controller)) {
- // This command has an invalid instance!
+ // This controller has an invalid instance!
throw new InvalidControllerInstanceException(array($this, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
} // END - if