Example #1
0
 /**
  * @param $controller
  * @param $view
  */
 public function render($controller, $view)
 {
     $this->controllers = get_class($controller);
     if (file_exists(VIEW . 'header.php')) {
         require_once VIEW . 'header.php';
     } else {
         $Ex = new Exception();
         $Ex->notHeader();
     }
     if (file_exists(VIEW . $this->controllers . '/' . $view . '.phtml')) {
         require_once VIEW . $this->controllers . '/' . $view . '.phtml';
     } else {
         $Ex = new Exception();
         $Ex->notIndex();
     }
     if (file_exists(VIEW . 'footer.php')) {
         require_once VIEW . 'footer.php';
     } else {
         $Ex = new Exception();
         $Ex->notFooter();
     }
 }