Class to handle compiling template function calls for "calc"
package | XenForo_Template |
---|
compile(\XenForo_Template_Compiler $compiler, string $function, array $arguments, array $options) : string
string
Name of the function called
array
Arguments to the function (should have at least 1)
array
Compilation options
string
_parseMathExpression(\XenForo_Template_Compiler $compiler, string $expression, array $placeholders, boolean $internalExpression, boolean $isFunction) : string
"?" values represent placeholders for variables. Returns valid PHP code for the expression.
string
The expression to parse. This value will be modified.
array
Placeholders to replace "?" with. This value will be modified.
boolean
True if parsing an internal expression (with parens)
boolean
True if parsing a function (allows commas to separate args)
string
PHP code