Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function renderView(){
- //If a single file should be loaded
- if($this->viewFile && file_exists(VIEWS_PATH.$this->viewFile)){
- require(VIEWS_PATH.$this->viewFile);
- //Render the template (the template renders the sent view)
- }elseif($this->viewName && file_exists(TEMPLATE_FILE_PATH)){
- require(TEMPLATE_FILE_PATH);
- //Save an error
- }else{
- echo 'Oops, something went wrong, we are looking into it!';
- $this->err->setError(array('err_cat' => 3, 'err_msg' => "View wasn't able to load"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement