Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2.  
  3. class Template{
  4. private $ci = null;
  5. private $args = [];
  6.  
  7. public function __construct(){
  8. $this->CI = & get_instance();
  9. }
  10.  
  11. function set($name, $value){
  12. $this->template_data[$name] = $value;
  13. }
  14.  
  15. public function display($template = '', $view = '', $view_data = array(), $return = false){
  16.  
  17. $this->set('contents', $this->CI->load->view($view, $view_data, true));
  18. return $this->CI->load->view($template, $this->template_data, $return);
  19. }
  20. }
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement