]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/resolver/controller/class_BaseControllerResolver.php
Re-added with access protection
[shipsimu.git] / inc / classes / main / resolver / controller / class_BaseControllerResolver.php
index f5849754627f3d3a5a935f3515e8fa1685fc7390..7a7d0268c5ba15fcdbd978932771b6617258e39a 100644 (file)
@@ -90,25 +90,25 @@ class BaseControllerResolver extends BaseResolver {
                } // END - if
 
                // Now, let us create the full name of the controller class
-               $className = sprintf("%s%sController",
+               $this->setClassName(sprintf("%s%sController",
                        $this->controllerPrefix,
                        $this->convertToClassName($controllerName)
-               );
+               ));
 
                // Try it hard to get an controller
                while (!$isValid) {
                        // Is this class already loaded?
-                       if (class_exists($className)) {
+                       if (class_exists($this->getClassName())) {
                                // This class does exist. :-)
                                $isValid = true;
-                       } elseif (($className != "WebDefaultController") && ($className != "WebDefaultNewsController")) {
+                       } elseif (($this->getClassName() != "WebDefaultController") && ($this->getClassName() != "WebDefaultNewsController")) {
                                // 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
-                                       $className = "WebDefaultNewsController";
+                                       $this->setClassName("WebDefaultNewsController");
                                } else {
                                        // No news at "home" page or non-news page
-                                       $className = "WebDefaultController";
+                                       $this->setClassName("WebDefaultController");
                                }
                        } else {
                                // All is tried, give it up here