// No news at main controller or non-news controller
$this->setClassName($className);
}
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('AFTER: controller=' . $this->getClassName());
// Is this class loaded?
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('AFTER: controller=' . $this->getClassName());
if (!class_exists($this->getClassName())) {
// Throw an exception here
throw new InvalidControllerException(array($this, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
- } // END - if
+ }
// Try to read a config entry for our resolver including controller name... ;-)
$resolverConfigEntry = sprintf('%s_cmd_%s_resolver_class', strtolower($this->getClassPrefix()), strtolower($controllerName));
* @throws InvalidArgumentException Thrown if given controller is not set
* @throws DefaultControllerException Thrown if default controller was not found
*/
- protected function isControllerValid ($namespace, $controllerName) {
+ protected function isControllerValid (string $namespace, string $controllerName) {
// Is a action set?
if (empty($namespace)) {
// Then thrown an exception here
// Create class name
$className = sprintf(
- '%s\%sController',
+ '%s\%s%sController',
$namespace,
- $this->getCapitalizedClassPrefix() . StringUtils::convertToClassName($controllerName)
+ $this->getCapitalizedClassPrefix(),
+ StringUtils::convertToClassName($controllerName)
);
+
// Application's default news controller
$appDefaultControllerName = sprintf(
'%s\%sDefaultNewsController',
$namespace,
$this->getCapitalizedClassPrefix()
);
+
// Framework's default news controller
$defaultControllerName = sprintf(
'Org\Mxchange\CoreFramework\Controller\News\%sDefaultNewsController',