/** * Build the string of the controller class to load for the current route * * @param \Library\Route $route : the current route * @return string : the controller class name w/ namespace */ private function BuildControllerClass(\Library\Route $route) { if (preg_match("`^lib.*\$`", $route->type())) { //AJAX request for the Framework return Enums\NameSpaceName::LibFolderName . Enums\NameSpaceName::LibControllersFolderName . $route->module() . Enums\FileNameConst::ControllerSuffix; } else { //AJAX request for the Application return Enums\NameSpaceName::AppsFolderName . $this->name . Enums\NameSpaceName::AppsControllersFolderName . $route->module() . Enums\FileNameConst::ControllerSuffix; } }