$this->controllerPrefix = $controllerPrefix;
}
+ /**
+ * Getter for controller prefix
+ *
+ * @param $controllerPrefix Last validated controllerPrefix
+ * @return void
+ */
+ protected final function getControllerPrefix () {
+ return $this->controllerPrefix;
+ }
+
/**
* Setter for controller name
*
*/
protected function loadController ($controllerName) {
// Cache default command
- $defaultController = $this->getConfigInstance()->readConfig('default_' . strtolower($this->getControllerPrefix()) . '_command');
+ $defaultController = $this->getConfigInstance()->getConfigEntry('default_' . strtolower($this->getControllerPrefix()) . '_command');
// Init controller instance
$controllerInstance = null;
$resolverConfigEntry = '';
// Try to read a config entry for our resolver including controller name... ;-)
- try {
- // Create the resolver name
- $resolverConfigEntry = sprintf("%s_cmd_%s_resolver_class", strtolower($this->getControllerPrefix()), 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 = $this->getControllerPrefix() . '_cmd_resolver_class';
- }
+ $resolverConfigEntry = sprintf("%s_cmd_%s_resolver_class", strtolower($this->getControllerPrefix()), strtolower($controllerName));
+
+ // Get the config, this will throw an exception if there is no special command resolver
+ $resolverClass = $this->getConfigInstance()->getConfigEntry($resolverConfigEntry);
// Initiate the resolver and controller
$resolverInstance = ObjectFactory::createObjectByConfiguredName(