Example #1
0
 private function get_controller($controller)
 {
     $file = "controller/{$controller}.php";
     /***********************************************************************
      * we are checking to see if the requested controller in the url exists
      * if it does we load by creating an instance of it's class,  if it
      * doesn't we call the error handler
      **********************************************************************/
     if (file_exists($file)) {
         return new $controller();
     } else {
         $error = new error_handler();
         $error->missing_page();
         return false;
     }
 }
Example #2
0
 private function page_error(Exception $err_info, $view_error_type, $page)
 {
     $error = new error_handler();
     $this->view_error_log($err_info, $page, $view_error_type);
     $error->missing_page();
     return false;
 }