function phptal_tales_calcxp($src, $nothrow) { $exp = Template::SplitSRC($src); $args = explode(' ', trim($src)); if (count($args) !== 2) { throw new PHPTAL_InvalidVariableNameException("calcxp takes two arguments, XP and CHG."); } $xp = phptal_tale($args[0]); $chg = phptal_tale($args[1]); array_unshift($exp, 'phptal_func_calcxp(' . $xp . ',' . $chg . ')'); return $exp; }
public static function nozero($src, $nothrow) { $exp = Template::SplitSRC($src, $nothrow); array_unshift($exp, 'Template_Tales::nozeroFUNC(' . phptal_tale($src, $nothrow) . ')'); return $exp; }