|
[PHP]
/*
PHPTAL 加上一些smarty的函数...
*/
class PHPTAL_Smarty_Mode extends PHPTAL
{
public function fetch($path)
{
$this->setTemplate($path);
$res = $this->execute();
return $res;
}
public function display($path)
{
$this->setTemplate($path);
$res = $this->execute();
echo $res;
return 1;
}
public function assign($varname, $value)
{
$this->set($varname, $value);
}
public functin append($varnmame, $value)
{
$this->$varname[] = $value;
}
}[/PHP] |
|