SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ||
3 | Class Template { | |
4 | ||
5 | var $template_data = array(); | |
6 | ||
7 | function set($name, $value) | |
8 | { | |
9 | $this->template_data[$name] = $value; | |
10 | } | |
11 | ||
12 | function load($template = '', $view = '', $view_data = array(), $return = FALSE) | |
13 | { | |
14 | $this->CI =& get_instance(); | |
15 | $this->set('contents', $this->CI->load->view($view, $view_data, TRUE)); | |
16 | return $this->CI->load->view($template, $this->template_data, $return); | |
17 | } | |
18 | ||
19 | } |