\Smarty_Internal_Runtime_TplFunction

TplFunction Runtime Methods callTemplateFunction

Summary

Methods
Properties
Constants
callTemplateFunction()
registerTplFunctions()
getTplFunction()
addTplFuncToCache()
saveTemplateVariables()
restoreTemplateVariables()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

callTemplateFunction()

callTemplateFunction(\Smarty_Internal_Template  $tpl, string  $name, array  $params, boolean  $nocache) 

Call template function

Parameters

\Smarty_Internal_Template $tpl

template object

string $name

template function name

array $params

parameter array

boolean $nocache

true if called nocache

Throws

\SmartyException

registerTplFunctions()

registerTplFunctions(\Smarty|\Smarty_Internal_Template|\Smarty_Internal_TemplateBase  $obj, array  $tplFunctions, boolean  $override = true) 

Register template functions defined by template

Parameters

\Smarty|\Smarty_Internal_Template|\Smarty_Internal_TemplateBase $obj
array $tplFunctions

source information array of template functions defined in template

boolean $override

if true replace existing functions with same name

getTplFunction()

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

Return source parameter array for single or all template functions

Parameters

\Smarty_Internal_Template $tpl

template object

null|string $name

template function name

Returns

array|boolean|mixed

addTplFuncToCache()

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

Add template function to cache file for nocache calls

Parameters

\Smarty_Internal_Template $tpl
string $_name

template function name

string $_function

PHP function name

Returns

boolean

saveTemplateVariables()

saveTemplateVariables(\Smarty_Internal_Template  $tpl, string  $name) 

Save current template variables on stack

Parameters

\Smarty_Internal_Template $tpl
string $name

stack name

restoreTemplateVariables()

restoreTemplateVariables(\Smarty_Internal_Template  $tpl, string  $name) 

Restore saved variables into template objects

Parameters

\Smarty_Internal_Template $tpl
string $name

stack name