*
* @param $controllerName The default controller we shall execute
* @return $isValid Wether the given controller is valid
- * @throws EmptyVariableException Thrown if the given controller is not set
- * @throws DefaultControllerException If the default controller was not found
+ * @throws EmptyVariableException Thrown if given controller is not set
+ * @throws DefaultControllerException Thrown if default controller was not found
*/
public function isControllerValid ($controllerName) {
// By default nothing shall be valid
));
// Try it hard to get an controller
- while (!$isValid) {
+ while ($isValid === false) {
// Is this class already loaded?
if (class_exists($this->getClassName())) {
// This class does exist. :-)
// Do we have news?
if ($this->getConfigInstance()->readConfig('page_with_news') == $this->getApplicationInstance()->getRequestInstance()->getRequestElement('page')) {
// Yes, display news in home then set default controller with news
- $this->setClassName($this->controllerPrefix.'DefaultNewsController');
+ $this->setClassName($this->controllerPrefix . 'DefaultNewsController');
} else {
// No news at home page or non-news page
- $this->setClassName($this->controllerPrefix.'DefaultController');
+ $this->setClassName($this->controllerPrefix . 'DefaultController');
}
} else {
// All is tried, give it up here
}
} // END - while
- // Debug output
- //* DEBUG: */ $this->debugBackTrace();
-
// Return the result
return $isValid;
}