Skip to content

Smarty_Internal_Runtime_TplFunction

TplFunction Runtime Methods callTemplateFunction

  • Full name: \Smarty_Internal_Runtime_TplFunction

Methods

callTemplateFunction

Call template function

public callTemplateFunction(\Smarty_Internal_Template $tpl, string $name, array $params, bool $nocache): mixed

Parameters:

Parameter Type Description
$tpl \Smarty_Internal_Template template object
$name string template function name
$params array parameter array
$nocache bool true if called nocache

Throws:


registerTplFunctions

Register template functions defined by template

public registerTplFunctions(\Smarty|\Smarty_Internal_Template|\Smarty_Internal_TemplateBase $obj, array $tplFunctions, bool $override = true): mixed

Parameters:

Parameter Type Description
$obj \Smarty|\Smarty_Internal_Template|\Smarty_Internal_TemplateBase
$tplFunctions array source information array of
template functions defined
in template
$override bool if true replace existing
functions with same name

getTplFunction

Return source parameter array for single or all template functions

public getTplFunction(\Smarty_Internal_Template $tpl, null|string $name = null): array|bool|mixed

Parameters:

Parameter Type Description
$tpl \Smarty_Internal_Template template object
$name null|string template function name

addTplFuncToCache

Add template function to cache file for nocache calls

public addTplFuncToCache(\Smarty_Internal_Template $tpl, string $_name, string $_function): bool

Parameters:

Parameter Type Description
$tpl \Smarty_Internal_Template
$_name string template function name
$_function string PHP function name

saveTemplateVariables

Save current template variables on stack

public saveTemplateVariables(\Smarty_Internal_Template $tpl, string $name): mixed

Parameters:

Parameter Type Description
$tpl \Smarty_Internal_Template
$name string stack name

restoreTemplateVariables

Restore saved variables into template objects

public restoreTemplateVariables(\Smarty_Internal_Template $tpl, string $name): mixed

Parameters:

Parameter Type Description
$tpl \Smarty_Internal_Template
$name string stack name


Automatically generated on 2025-03-18