*/
private function loadController ($controllerName) {
// Cache default command
- $defaultController = $this->getConfigInstance()->readConfig('default_web_command');
+ $defaultController = $this->getConfigInstance()->readConfig('default_console_command');
// Init controller instance
$controllerInstance = null;
// Default controller
- $this->setClassName('ConsoleDefaultController');
+ $this->setClassName('ConsoleDefaultNewsController');
// Generate the class name
//* DEBUG: */ echo __METHOD__.": Controller=".$controllerName;
// ... and set it
$this->setClassName($className);
- } elseif ($this->getConfigInstance()->readConfig('page_with_news') == $this->getApplicationInstance()->getRequestInstance()->getRequestElement('page')) {
- // Yes, display news in home then set default controller with news
- $this->setClassName('ConsoleDefaultNewsController');
} else {
- // No news at home page or non-news page
- $this->setClassName('ConsoleDefaultController');
+ // No news at main command or non-news command
+ $this->setClassName('ConsoleDefaultNewsController');
}
//* DEBUG: */ echo ", controller=".$this->getClassName()."<br />\n";
// Try to read a config entry for our resolver including controller name... ;-)
try {
// Create the resolver name
- $resolverConfigEntry = sprintf("web_cmd_%s_resolver_class", strtolower($controllerName));
+ $resolverConfigEntry = sprintf("console_cmd_%s_resolver_class", strtolower($controllerName));
// Get the config, this will throw an exception if there is no special command resolver
$resolverClass = $this->getConfigInstance()->readConfig($resolverConfigEntry);
} catch (ConfigEntryNotFoundException $e) {
// Use default resolver entry
// @TODO Maybe we need to log this?
- $resolverConfigEntry = 'web_cmd_resolver_class';
+ $resolverConfigEntry = 'console_cmd_resolver_class';
}
// Initiate the resolver and controller