Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. private function renderView(){
  2.  
  3. //If a single file should be loaded
  4. if($this->viewFile && file_exists(VIEWS_PATH.$this->viewFile)){
  5. require(VIEWS_PATH.$this->viewFile);
  6.  
  7.  
  8. //Render the template (the template renders the sent view)
  9. }elseif($this->viewName && file_exists(TEMPLATE_FILE_PATH)){
  10. require(TEMPLATE_FILE_PATH);
  11.  
  12.  
  13. //Save an error
  14. }else{
  15. echo 'Oops, something went wrong, we are looking into it!';
  16. $this->err->setError(array('err_cat' => 3, 'err_msg' => "View wasn't able to load"));
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement