Example #1
0
function render($tFile, $vs=array()) {
    ob_start();
    foreach($GLOBALS AS $_k=>$_v) {
        ${$_k} = $_v;
    }
	foreach($vs AS $_k=>$_v) {
		${$_k} = $_v;
	}
	include template($tFile);
    return render_hook(ob_get_clean());
}
 function __destruct()
 {
     global $AJAX, $INI;
     if (self::$_debug && !$AJAX) {
         echo 'Generation Cost: ' . (microtime(true) - self::$_begin) . 's';
     }
     $c = ob_get_clean();
     if (function_exists('render_hook')) {
         $c = render_hook($c);
     }
     if (function_exists('output_hook')) {
         die(output_hook($c));
     }
     die($c);
 }