1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| /**
* Retourne le code compilé d'un module sous forme
* d'une variable.
*/
function pparse_mod($handle)
{
if (!$this->loadfile($handle))
{
die("Template->pparse(): Couldn't load template file for handle $handle");
}
// actually compile the template now.
if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
{
// Actually compile the code now.
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle] , true , "_ret");
}
// Run the compiled code.
eval($this->compiled_code[$handle]) ;
return $_ret ;
} |