page = implode('',file($source)) ; // echo $this->page; return ; } function merge( $data ) { // print_r ($data) ; $this->f_page = preg_replace_callback('/{([^}]+)}/', function($matches) use ($data) { return $data[str_replace(array('{','}'),'',$matches[0])] ;}, $this->page) ; // print $this->f_page; return ; } function write() { return $this->f_page ; } } ?>