Exemple #1
0
 public static function setController($module, $controller)
 {
     $controllerName = ucfirst($controller) . 'Controller';
     if (file_exists(APP . DS . 'modules' . DS . $module . DS . 'controllers' . DS . $controllerName . '.php')) {
         self::$_controller = new $controllerName(self::$_model, self::$_view);
     } else {
         header('HTTP/1.0 500 Internal Server Error');
         exit("<h1>500 Internal Server Error</h1>Controller could not be found.");
     }
 }