Properties

$_objType

$_objType : integer

This object type (Smarty = 1, template = 2, data = 4)

Type

integer

$template_class

$template_class : string

name of class used for templates

Type

string

$tpl_vars

$tpl_vars : array<mixed,\Smarty_Variable>

template variables

Type

array<mixed,\Smarty_Variable>

$config_vars

$config_vars : array<mixed,string>

configuration settings

Type

array<mixed,string>

$template_data

$template_data : array

template data

Type

array

$ignore_uid

$ignore_uid : array

List of uid's which shall be ignored

Type

array

$index

$index : integer

Index of display() and fetch() calls

Type

integer

$offset

$offset : integer

Counter for window offset

Type

integer

$scope

$scope : integer

Type

integer

$smarty

$smarty : \Smarty

The following methods will be dynamically loaded by the extension handler when they are called. They are located in a corresponding Smarty_Internal_Method_xxxx class

Type

\Smarty

Methods

__construct()

__construct() 

Smarty_Internal_Data constructor.

Install extension handler

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

append()

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

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|\Smarty_Internal_Template|\Smarty

assignGlobal()

assignGlobal(string  $varName, mixed  $value = null, boolean  $nocache = false) : \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty

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|\Smarty_Internal_Template|\Smarty

appendByRef()

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

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|\Smarty_Internal_Template|\Smarty

assignByRef()

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

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|\Smarty_Internal_Template|\Smarty

getTemplateVars()

getTemplateVars(string  $varName = null, \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty  $_ptr = null, boolean  $searchParents = true) : mixed

Returns a single or all template variables

Parameters

string $varName

variable name or null

\Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $_ptr

optional pointer to data object

boolean $searchParents

include parent templates?

Returns

mixed —

variable value or or array of variables

getVariable()

getVariable(string  $variable = null, \Smarty_Internal_Data  $_ptr = null, boolean  $searchParents = true, boolean  $error_enable = true) : \Smarty_Variable|\Smarty_Undefined_Variable

gets the object of a Smarty variable

Parameters

string $variable

the name of the Smarty variable

\Smarty_Internal_Data $_ptr

optional pointer to data object

boolean $searchParents

search also in parent data

boolean $error_enable

Returns

\Smarty_Variable|\Smarty_Undefined_Variable

the object of the variable

_mergeVars()

_mergeVars(\Smarty_Internal_Data|null  $data = null) 

Follow the parent chain an merge template and config variables

Parameters

\Smarty_Internal_Data|null $data

_isDataObj()

_isDataObj() : boolean

Return true if this instance is a Data obj

Returns

boolean

_isTplObj()

_isTplObj() : boolean

Return true if this instance is a template obj

Returns

boolean

_isSmartyObj()

_isSmartyObj() : boolean

Return true if this instance is a Smarty obj

Returns

boolean

_getSmartyObj()

_getSmartyObj() : \Smarty

Get Smarty object

Returns

\Smarty

__call()

__call(string  $name, array  $args) : mixed

Handle unknown class methods

Parameters

string $name

unknown method-name

array $args

argument array

Throws

\SmartyException

Returns

mixed

start_template()

start_template(\Smarty_Internal_Template  $template, null  $mode = null) 

Start logging template

Parameters

\Smarty_Internal_Template $template

template

null $mode

true: display false: fetch null: subtemplate

end_template()

end_template(\Smarty_Internal_Template  $template) 

End logging of cache time

Parameters

\Smarty_Internal_Template $template

cached template

start_compile()

start_compile(\Smarty_Internal_Template  $template) 

Start logging of compile time

Parameters

\Smarty_Internal_Template $template

end_compile()

end_compile(\Smarty_Internal_Template  $template) 

End logging of compile time

Parameters

\Smarty_Internal_Template $template

start_render()

start_render(\Smarty_Internal_Template  $template) 

Start logging of render time

Parameters

\Smarty_Internal_Template $template

end_render()

end_render(\Smarty_Internal_Template  $template) 

End logging of compile time

Parameters

\Smarty_Internal_Template $template

start_cache()

start_cache(\Smarty_Internal_Template  $template) 

Start logging of cache time

Parameters

\Smarty_Internal_Template $template

cached template

end_cache()

end_cache(\Smarty_Internal_Template  $template) 

End logging of cache time

Parameters

\Smarty_Internal_Template $template

cached template

register_template()

register_template(\Smarty_Internal_Template  $template) 

Register template object

Parameters

\Smarty_Internal_Template $template

cached template

register_data()

register_data(\Smarty_Data  $data) 

Register data object

Parameters

\Smarty_Data $data

data object

display_debug()

display_debug(\Smarty_Internal_Template|\Smarty  $obj, boolean  $full = false) 

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

Parameters

\Smarty_Internal_Template|\Smarty $obj

object to debug

boolean $full

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

debugUrl()

debugUrl(\Smarty  $smarty) 

handle 'URL' debugging mode

Parameters

\Smarty $smarty

getConfigVariable()

getConfigVariable(string  $varName, boolean  $errorEnable = true) : mixed

Parameters

string $varName
boolean $errorEnable

Returns

mixed

getConfigVars()

getConfigVars(string  $varName = null, boolean  $searchParents = true) : mixed

Parameters

string $varName
boolean $searchParents

Returns

mixed

getGlobal()

getGlobal(string  $varName = null) : mixed

Parameters

string $varName

Returns

mixed

getStreamVariable()

getStreamVariable(string  $variable) : mixed

Parameters

string $variable

Returns

mixed

clearAssign()

clearAssign(mixed  $tpl_var) : \Smarty_Internal_Data

Parameters

mixed $tpl_var

Returns

\Smarty_Internal_Data

clearAllAssign()

clearAllAssign() : \Smarty_Internal_Data

Returns

\Smarty_Internal_Data

clearConfig()

clearConfig(string  $varName = null) : \Smarty_Internal_Data

Parameters

string $varName

Returns

\Smarty_Internal_Data

configLoad()

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

Parameters

string $config_file
mixed $sections
string $scope

Returns

\Smarty_Internal_Data

get_key()

get_key(\Smarty_Internal_Template  $template) : string

Return key into $template_data for template

Parameters

\Smarty_Internal_Template $template

template object

Returns

string —

key into $template_data