Main class with template data structures and methods
| package | Smarty |
|---|---|
| subpackage | Template |
__call(string $name, array $args)
| inherited_from | \Smarty_Internal_TemplateBase::__call() |
|---|
stringunknown method-name
arrayargument array
__construct(string $template_resource, \Smarty $smarty, \Smarty_Internal_Template $_parent, mixed $_cache_id, mixed $_compile_id, bool $_caching, int $_cache_lifetime)
Some of the global Smarty settings copied to template scope It load the required template resources and cacher plugins
stringtemplate resource string
mixedcache id or null
mixedcompile id or null
booluse caching?
intcache life-time in seconds
__destruct()
__get(string $property_name)
stringproperty name
__set(string $property_name, mixed $value)
stringproperty name
mixedvalue
_count(mixed $value) : int
mixed
intthe count for arrays and objects that implement countable, 1 for other objects that don't, and 0 for empty elements_get_filter_name(callback $function_name) : string
| inherited_from | \Smarty_Internal_TemplateBase::_get_filter_name() |
|---|
callback
stringinternal filter nameappend(array | string $tpl_var, mixed $value, boolean $merge, boolean $nocache) : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::append() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::append() |
arraystringthe template variable name(s)
mixedthe value to append
booleanflag if array elements shall be merged
booleanif true any output of this variable will be not cached
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingappendByRef(string $tpl_var, mixed $value, boolean $merge) : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::appendByRef() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::appendByRef() |
stringthe template variable name
mixed&$value the referenced value to append
booleanflag if array elements shall be merged
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingassign(array | string $tpl_var, mixed $value, boolean $nocache) : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::assign() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::assign() |
arraystringthe template variable name(s)
mixedthe value to assign
booleanif true any output of this variable will be not cached
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingassignByRef(string $tpl_var, $value, boolean $nocache) : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::assignByRef() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::assignByRef() |
stringthe template variable name
booleanif true any output of this variable will be not cached
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingassignGlobal(string $varname, mixed $value, boolean $nocache) : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::assignGlobal() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::assignGlobal() |
stringthe global variable name
mixedthe value to assign
booleanif true any output of this variable will be not cached
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingcapture_error()
clearAllAssign() : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::clearAllAssign() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::clearAllAssign() |
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingclearAssign(string | array $tpl_var) : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::clearAssign() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::clearAssign() |
stringarraythe template variable(s) to clear
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingclearCache(integer $exp_time) : integer
integerexpiration time
integernumber of cache files deletedclearConfig(string $varname) : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::clearConfig() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::clearConfig() |
stringvariable name or null
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingcompileTemplateSource()
If the template is not evaluated the compiled template is saved on disk
configLoad(string $config_file, mixed $sections) : \Smarty_Internal_Data
| inherited_from | \Smarty_Internal_Data::configLoad() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::configLoad() |
stringfilename
mixedarray of section names, single section or null
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingcreateData(object $parent)
| returns | Smarty_Data data object |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::createData() |
objectnext higher level of Smarty variables
createLocalArrayVariable(string $tpl_var, bool $nocache, int $scope)
stringtempate variable name
boolcache mode of variable
intscope of variable
createTemplateCodeFrame(string $content, bool $cache) : string
stringoptional template content
boolflag for cache file
stringdecodeProperties(array $properties, bool $cache) : bool
arrayspecial template properties
boolflag if called from cache file
boolflag if compiled or cache file is validdisplay(string $template, mixed $cache_id, mixed $compile_id, object $parent)
| inherited_from | \Smarty_Internal_TemplateBase::display() |
|---|
stringthe resource handle of the template file or template object
mixedcache id to be used with this template
mixedcompile id to be used with this template
objectnext higher level of Smarty variables
fetch(string $template, mixed $cache_id, mixed $compile_id, object $parent, bool $display, bool $merge_tpl_vars, bool $no_output_filter) : string
| inherited_from | \Smarty_Internal_TemplateBase::fetch() |
|---|
stringthe resource handle of the template file or template object
mixedcache id to be used with this template
mixedcompile id to be used with this template
objectnext higher level of Smarty variables
booltrue: display, false: fetch
boolif true parent template variables merged in to local scope
boolif true do not run output filter
stringrendered template outputgetConfigVariable(string $variable, $error_enable) : mixed
| inherited_from | \Smarty_Internal_Data::getConfigVariable() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::getConfigVariable() |
stringthe name of the config variable
mixedthe value of the config variablegetConfigVars(string $varname, $search_parents) : string
| inherited_from | \Smarty_Internal_Data::getConfigVars() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::getConfigVars() |
stringvariable name or null
stringvariable value or or array of variablesgetRegisteredObject(string $name) : object
| inherited_from | \Smarty_Internal_TemplateBase::getRegisteredObject() |
|---|
stringobject name
\SmartyException |
if no such object is found |
|---|
objectgetScope(int $scope) : array
intrequested variable scope
arrayarray of template variablesgetScopePointer(int $scope) : mixed
intpqrent or root scope
mixedobjectgetStreamVariable(string $variable) : mixed
| inherited_from | \Smarty_Internal_Data::getStreamVariable() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::getStreamVariable() |
stringthe stream of the variable
mixedthe value of the stream variablegetSubTemplate(string $template, mixed $cache_id, mixed $compile_id, integer $caching, integer $cache_lifetime, $data, int $parent_scope)
| returns | string template content |
|---|
stringthe resource handle of the template file
mixedcache id to be used with this template
mixedcompile id to be used with this template
integercache mode
integerlife time of cache data
intscope in which {include} should execute
getTemplateVars(string $varname, string $_ptr, boolean $search_parents) : string
| inherited_from | \Smarty_Internal_Data::getTemplateVars() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::getTemplateVars() |
stringvariable name or null
stringoptional pointer to data object
booleaninclude parent templates?
stringvariable value or or array of variablesgetVariable(string $variable, object $_ptr, boolean $search_parents, $error_enable) : object
| inherited_from | \Smarty_Internal_Data::getVariable() |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::getVariable() |
stringthe name of the Smarty variable
objectoptional pointer to data object
booleansearch also in parent data
objectthe object of the variableisCached(string | object $template, mixed $cache_id, mixed $compile_id, object $parent) : boolean
| inherited_from | \Smarty_Internal_TemplateBase::isCached() |
|---|
stringobjectthe resource handle of the template file or template object
mixedcache id to be used with this template
mixedcompile id to be used with this template
objectnext higher level of Smarty variables
booleancache statusloadFilter(string $type, string $name)
| inherited_from | \Smarty_Internal_TemplateBase::loadFilter() |
|---|
stringfilter type
stringfilter name
\SmartyException |
if filter could not be loaded |
|---|
mustCompile() : boolean
It does compare the timestamps of template source and the compiled templates and checks the force compile configuration
booleantrue if the template must be compiledregisterCacheResource(string $type, \Smarty_CacheResource $callback) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerCacheResource() |
|---|
stringname of cache resource type
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterClass($class_name, string $class_impl) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerClass() |
|---|
stringthe referenced PHP class to register
\SmartyException |
if $class_impl does not refer to an existing class |
|---|
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterDefaultConfigHandler(callable $callback) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerDefaultConfigHandler() |
|---|
callableclass/method name
\SmartyException |
if $callback is not callable |
|---|
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterDefaultPluginHandler(callable $callback) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerDefaultPluginHandler() |
|---|
callableclass/method name
\SmartyException |
if $callback is not callable |
|---|
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterDefaultTemplateHandler(callable $callback) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerDefaultTemplateHandler() |
|---|
callableclass/method name
\SmartyException |
if $callback is not callable |
|---|
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterFilter(string $type, callback $callback) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerFilter() |
|---|
stringfilter type
callback
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterObject($object_name, object $object_impl, array $allowed, boolean $smarty_args, array $block_methods) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerObject() |
|---|
objectthe referenced PHP object to register
arraylist of allowed methods (empty = all)
booleansmarty argument format, else traditional
arraylist of block-methods
\SmartyException |
if any of the methods in $allowed or $block_methods are invalid |
|---|
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterPlugin(string $type, string $tag, callback $callback, boolean $cacheable, array $cache_attr) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerPlugin() |
|---|
stringplugin type
stringname of template tag
callbackPHP callback to register
booleanif true (default) this fuction is cachable
arraycaching attributes if any
\SmartyException |
when the plugin tag is invalid |
|---|
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterResource(string $type, \Smarty_Resource | array $callback) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::registerResource() |
|---|
stringname of resource type
\Smarty_Resourcearrayor instance of Smarty_Resource, or array of callbacks to handle resource (deprecated)
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingsetupInlineSubTemplate(string $template, mixed $cache_id, mixed $compile_id, integer $caching, integer $cache_lifetime, $data, int $parent_scope, string $hash)
| returns | string template content |
|---|
stringthe resource handle of the template file
mixedcache id to be used with this template
mixedcompile id to be used with this template
integercache mode
integerlife time of cache data
intscope in which {include} should execute
stringnocache hash code
unloadFilter(string $type, string $name) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::unloadFilter() |
|---|
stringfilter type
stringfilter name
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingunregisterCacheResource(string $type) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::unregisterCacheResource() |
|---|
stringname of cache resource type
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingunregisterFilter(string $type, callback $callback) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::unregisterFilter() |
|---|
stringfilter type
callback
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingunregisterObject(string $name) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::unregisterObject() |
|---|
stringobject name
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingunregisterPlugin(string $type, string $tag) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::unregisterPlugin() |
|---|
stringof plugin
stringname of plugin
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingunregisterResource(string $type) : \Smarty_Internal_Templatebase
| inherited_from | \Smarty_Internal_TemplateBase::unregisterResource() |
|---|
stringname of resource type
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingwriteCachedContent($content) : bool
boolreplaceCamelcase(string $match) : string
| inherited_from | \Smarty_Internal_TemplateBase::replaceCamelcase() |
|---|
stringmatch string
stringreplacemant$_capture_stack : array
$allow_relative_path : bool
$block_data : array
$cache_id : string
$cache_lifetime : integer
$cached : \Smarty_Template_Cached
| magic | |
|---|---|
| property |
$caching : boolean
$compile_id : string
$compiled : \Smarty_Template_Compiled
| magic | |
|---|---|
| property |
$config_vars : array
| inherited_from | \Smarty_Internal_Data::$$config_vars |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::$$config_vars |
$has_nocache_code : bool
$mustCompile : bool
$parent : \Smarty_Internal_Template
| inherited_from | \Smarty_Internal_Data::$$parent |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::$$parent |
$properties : array
$required_plugins : array
$smarty : \Smarty
$source : \Smarty_Template_Source
| magic | |
|---|---|
| property |
$template_class : string
| inherited_from | \Smarty_Internal_Data::$$template_class |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::$$template_class |
$template_resource : string
$tpl_vars : array
| inherited_from | \Smarty_Internal_Data::$$tpl_vars |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::$$tpl_vars |
$variable_filters : array