예제 #1
0
 /**
  * Prints the page based on a data array and a template file
  * @param string the name of the template to use
  * @param array an array of data for the template engine
  * @return string
  * @access public
  */
 function render($file, $data = '')
 {
     require_once 'template.class.php';
     $template = new Template('templates/' . $file);
     if (is_array($data)) {
         $template->replaceTags($data);
     }
     return $template->output();
 }