template = file_get_contents($tpl_name); } } public function set_tpl($key,$var) { $this->vars[$key] = $var; } public function tpl_parse() { foreach($this->vars as $find => $replace) { $this->template = str_replace($find, $replace, $this->template); } } } ?>