function parse() { foreach ($this->files as $file) { $flexy = new HTML_Template_Flexy(array('compileToString' => true, 'valid_functions' => 'include')); $compiler = HTML_Template_Flexy_Compiler::factory($flexy->options); $result = $compiler->compile($flexy, file_get_contents($file)); echo $result; print_r(array_unique($GLOBALS['_HTML_TEMPLATE_FLEXY_TOKEN']['gettextStrings'])); print_r($flexy->elements); } }
/** * compiles all templates * Used for offline batch compilation (eg. if your server doesn't have write access to the filesystem). * * @access public * @author Alan Knowles <*****@*****.**> * */ function compileAll($dir = '', $regex = '/.html$/') { require_once 'HTML/Template/Flexy/Compiler.php'; $c = new HTML_Template_Flexy_Compiler(); $c->compileAll($this, $dir, $regex); }
/** * compiles all templates * Used for offline batch compilation (eg. if your server doesn't have write access to the filesystem). * * @access public * @author Alan Knowles <*****@*****.**> * */ function compileAll($dir = '', $regex = '/.html$/') { $c = new HTML_Template_Flexy_Compiler(); $c->compileAll($this, $dir, $regex); }