Example #1
0
 private function _getController($controllerName)
 {
     try {
         require DOCUMENT_ROOT . $this->config->getControllersPath() . implode(explode('_', $controllerName)) . '.php';
         return new $controllerName();
     } catch (Exception $e) {
         throw new Exception("Controller:" . $controller . " cannot be found.", 3);
     }
 }