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>

$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

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