Properties

$template_class

$template_class : string

name of class used for templates

Type

string

$tpl_vars

$tpl_vars : array

template variables

Type

array

$config_vars

$config_vars : array

configuration settings

Type

array

$template_data

$template_data : array

template data

Type

array

Methods

assign()

assign(array|string  $tpl_var, mixed  $value = null, boolean  $nocache = false) : \Smarty_Internal_Data

assigns a Smarty variable

Parameters

array|string $tpl_var

the template variable name(s)

mixed $value

the value to assign

boolean $nocache

if true any output of this variable will be not cached

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

assignGlobal()

assignGlobal(string  $varname, mixed  $value = null, boolean  $nocache = false) : \Smarty_Internal_Data

assigns a global Smarty variable

Parameters

string $varname

the global variable name

mixed $value

the value to assign

boolean $nocache

if true any output of this variable will be not cached

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

assignByRef()

assignByRef(string  $tpl_var,   $value, boolean  $nocache = false) : \Smarty_Internal_Data

assigns values to template variables by reference

Parameters

string $tpl_var

the template variable name

$value
boolean $nocache

if true any output of this variable will be not cached

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

append()

append(array|string  $tpl_var, mixed  $value = null, boolean  $merge = false, boolean  $nocache = false) : \Smarty_Internal_Data

appends values to template variables

Parameters

array|string $tpl_var

the template variable name(s)

mixed $value

the value to append

boolean $merge

flag if array elements shall be merged

boolean $nocache

if true any output of this variable will be not cached

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

appendByRef()

appendByRef(string  $tpl_var,   $value, boolean  $merge = false) : \Smarty_Internal_Data

appends values to template variables by reference

Parameters

string $tpl_var

the template variable name

$value
boolean $merge

flag if array elements shall be merged

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

getTemplateVars()

getTemplateVars(string  $varname = null, string  $_ptr = null, boolean  $search_parents = true) : string

Returns a single or all template variables

Parameters

string $varname

variable name or null

string $_ptr

optional pointer to data object

boolean $search_parents

include parent templates?

Returns

string —

variable value or or array of variables

clearAssign()

clearAssign(string|array  $tpl_var) : \Smarty_Internal_Data

clear the given assigned template variable.

Parameters

string|array $tpl_var

the template variable(s) to clear

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

clearAllAssign()

clearAllAssign() : \Smarty_Internal_Data

clear all the assigned template variables.

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

configLoad()

configLoad(string  $config_file, mixed  $sections = null) : \Smarty_Internal_Data

load a config file, optionally load just selected sections

Parameters

string $config_file

filename

mixed $sections

array of section names, single section or null

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

getVariable()

getVariable(string  $variable, object  $_ptr = null, boolean  $search_parents = true,   $error_enable = true) : object

gets the object of a Smarty variable

Parameters

string $variable

the name of the Smarty variable

object $_ptr

optional pointer to data object

boolean $search_parents

search also in parent data

$error_enable

Returns

object —

the object of the variable

getConfigVariable()

getConfigVariable(string  $variable,   $error_enable = true) : mixed

gets a config variable

Parameters

string $variable

the name of the config variable

$error_enable

Returns

mixed —

the value of the config variable

getStreamVariable()

getStreamVariable(string  $variable) : mixed

gets a stream variable

Parameters

string $variable

the stream of the variable

Returns

mixed —

the value of the stream variable

getConfigVars()

getConfigVars(string  $varname = null,   $search_parents = true) : string

Returns a single or all config variables

Parameters

string $varname

variable name or null

$search_parents

Returns

string —

variable value or or array of variables

clearConfig()

clearConfig(string  $varname = null) : \Smarty_Internal_Data

Deassigns a single or all config variables

Parameters

string $varname

variable name or null

Returns

\Smarty_Internal_Data

current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining

start_compile()

start_compile(object  $template) 

Start logging of compile time

Parameters

object $template

end_compile()

end_compile(object  $template) 

End logging of compile time

Parameters

object $template

start_render()

start_render(object  $template) 

Start logging of render time

Parameters

object $template

end_render()

end_render(object  $template) 

End logging of compile time

Parameters

object $template

start_cache()

start_cache(object  $template) 

Start logging of cache time

Parameters

object $template

cached template

end_cache()

end_cache(object  $template) 

End logging of cache time

Parameters

object $template

cached template

display_debug()

display_debug(\Smarty_Internal_Template|\Smarty  $obj) 

Opens a window for the Smarty Debugging Consol and display the data

Parameters

\Smarty_Internal_Template|\Smarty $obj

object to debug

get_debug_vars()

get_debug_vars(\Smarty_Internal_Template|\Smarty_Data  $obj) : \StdClass

Recursively gets variables from all template/data scopes

Parameters

\Smarty_Internal_Template|\Smarty_Data $obj

object to debug

Returns

\StdClass

get_key()

get_key(object  $template) : string

Return key into $template_data for template

Parameters

object $template

template object

Returns

string —

key into $template_data