Main class with template data structures and methods
package | Smarty |
---|---|
subpackage | Template |
__call(string $name, array $args)
inherited_from | \Smarty_Internal_TemplateBase::__call() |
---|
string
unknown method-name
array
argument 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
string
template resource string
mixed
cache id or null
mixed
compile id or null
bool
use caching?
int
cache life-time in seconds
__destruct()
__get(string $property_name)
string
property name
__set(string $property_name, mixed $value)
string
property name
mixed
value
_count(mixed $value) : int
mixed
int
the 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
string
internal 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() |
array
string
the template variable name(s)
mixed
the value to append
boolean
flag if array elements shall be merged
boolean
if true any output of this variable will be not cached
\Smarty_Internal_Data
current 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() |
string
the template variable name
mixed
&$value the referenced value to append
boolean
flag if array elements shall be merged
\Smarty_Internal_Data
current 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() |
array
string
the template variable name(s)
mixed
the value to assign
boolean
if true any output of this variable will be not cached
\Smarty_Internal_Data
current 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() |
string
the template variable name
boolean
if true any output of this variable will be not cached
\Smarty_Internal_Data
current 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() |
string
the global variable name
mixed
the value to assign
boolean
if true any output of this variable will be not cached
\Smarty_Internal_Data
current 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_Data
current 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() |
string
array
the template variable(s) to clear
\Smarty_Internal_Data
current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chainingclearCache(integer $exp_time) : integer
integer
expiration time
integer
number of cache files deletedclearConfig(string $varname) : \Smarty_Internal_Data
inherited_from | \Smarty_Internal_Data::clearConfig() |
---|---|
inherited_from | \Smarty_Internal_TemplateBase::clearConfig() |
string
variable name or null
\Smarty_Internal_Data
current 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() |
string
filename
mixed
array of section names, single section or null
\Smarty_Internal_Data
current 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() |
object
next higher level of Smarty variables
createLocalArrayVariable(string $tpl_var, bool $nocache, int $scope)
string
tempate variable name
bool
cache mode of variable
int
scope of variable
createTemplateCodeFrame(string $content, bool $cache) : string
string
optional template content
bool
flag for cache file
string
decodeProperties(array $properties, bool $cache) : bool
array
special template properties
bool
flag if called from cache file
bool
flag if compiled or cache file is validdisplay(string $template, mixed $cache_id, mixed $compile_id, object $parent)
inherited_from | \Smarty_Internal_TemplateBase::display() |
---|
string
the resource handle of the template file or template object
mixed
cache id to be used with this template
mixed
compile id to be used with this template
object
next 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() |
---|
string
the resource handle of the template file or template object
mixed
cache id to be used with this template
mixed
compile id to be used with this template
object
next higher level of Smarty variables
bool
true: display, false: fetch
bool
if true parent template variables merged in to local scope
bool
if true do not run output filter
string
rendered template outputgetConfigVariable(string $variable, $error_enable) : mixed
inherited_from | \Smarty_Internal_Data::getConfigVariable() |
---|---|
inherited_from | \Smarty_Internal_TemplateBase::getConfigVariable() |
string
the name of the config variable
mixed
the value of the config variablegetConfigVars(string $varname, $search_parents) : string
inherited_from | \Smarty_Internal_Data::getConfigVars() |
---|---|
inherited_from | \Smarty_Internal_TemplateBase::getConfigVars() |
string
variable name or null
string
variable value or or array of variablesgetRegisteredObject(string $name) : object
inherited_from | \Smarty_Internal_TemplateBase::getRegisteredObject() |
---|
string
object name
\SmartyException |
if no such object is found |
---|
object
getScope(int $scope) : array
int
requested variable scope
array
array of template variablesgetScopePointer(int $scope) : mixed
int
pqrent or root scope
mixed
objectgetStreamVariable(string $variable) : mixed
inherited_from | \Smarty_Internal_Data::getStreamVariable() |
---|---|
inherited_from | \Smarty_Internal_TemplateBase::getStreamVariable() |
string
the stream of the variable
mixed
the 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 |
---|
string
the resource handle of the template file
mixed
cache id to be used with this template
mixed
compile id to be used with this template
integer
cache mode
integer
life time of cache data
int
scope 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() |
string
variable name or null
string
optional pointer to data object
boolean
include parent templates?
string
variable 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() |
string
the name of the Smarty variable
object
optional pointer to data object
boolean
search also in parent data
object
the object of the variableisCached(string | object $template, mixed $cache_id, mixed $compile_id, object $parent) : boolean
inherited_from | \Smarty_Internal_TemplateBase::isCached() |
---|
string
object
the resource handle of the template file or template object
mixed
cache id to be used with this template
mixed
compile id to be used with this template
object
next higher level of Smarty variables
boolean
cache statusloadFilter(string $type, string $name)
inherited_from | \Smarty_Internal_TemplateBase::loadFilter() |
---|
string
filter type
string
filter 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
boolean
true if the template must be compiledregisterCacheResource(string $type, \Smarty_CacheResource $callback) : \Smarty_Internal_Templatebase
inherited_from | \Smarty_Internal_TemplateBase::registerCacheResource() |
---|
string
name of cache resource type
\Smarty_Internal_Templatebase
current 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() |
---|
string
the referenced PHP class to register
\SmartyException |
if $class_impl does not refer to an existing class |
---|
\Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterDefaultConfigHandler(callable $callback) : \Smarty_Internal_Templatebase
inherited_from | \Smarty_Internal_TemplateBase::registerDefaultConfigHandler() |
---|
callable
class/method name
\SmartyException |
if $callback is not callable |
---|
\Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterDefaultPluginHandler(callable $callback) : \Smarty_Internal_Templatebase
inherited_from | \Smarty_Internal_TemplateBase::registerDefaultPluginHandler() |
---|
callable
class/method name
\SmartyException |
if $callback is not callable |
---|
\Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingregisterDefaultTemplateHandler(callable $callback) : \Smarty_Internal_Templatebase
inherited_from | \Smarty_Internal_TemplateBase::registerDefaultTemplateHandler() |
---|
callable
class/method name
\SmartyException |
if $callback is not callable |
---|
\Smarty_Internal_Templatebase
current 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() |
---|
string
filter type
callback
\Smarty_Internal_Templatebase
current 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() |
---|
object
the referenced PHP object to register
array
list of allowed methods (empty = all)
boolean
smarty argument format, else traditional
array
list of block-methods
\SmartyException |
if any of the methods in $allowed or $block_methods are invalid |
---|
\Smarty_Internal_Templatebase
current 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() |
---|
string
plugin type
string
name of template tag
callback
PHP callback to register
boolean
if true (default) this fuction is cachable
array
caching attributes if any
\SmartyException |
when the plugin tag is invalid |
---|
\Smarty_Internal_Templatebase
current 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() |
---|
string
name of resource type
\Smarty_Resource
array
or instance of Smarty_Resource, or array of callbacks to handle resource (deprecated)
\Smarty_Internal_Templatebase
current 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 |
---|
string
the resource handle of the template file
mixed
cache id to be used with this template
mixed
compile id to be used with this template
integer
cache mode
integer
life time of cache data
int
scope in which {include} should execute
string
nocache hash code
unloadFilter(string $type, string $name) : \Smarty_Internal_Templatebase
inherited_from | \Smarty_Internal_TemplateBase::unloadFilter() |
---|
string
filter type
string
filter name
\Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingunregisterCacheResource(string $type) : \Smarty_Internal_Templatebase
inherited_from | \Smarty_Internal_TemplateBase::unregisterCacheResource() |
---|
string
name of cache resource type
\Smarty_Internal_Templatebase
current 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() |
---|
string
filter type
callback
\Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingunregisterObject(string $name) : \Smarty_Internal_Templatebase
inherited_from | \Smarty_Internal_TemplateBase::unregisterObject() |
---|
string
object name
\Smarty_Internal_Templatebase
current 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() |
---|
string
of plugin
string
name of plugin
\Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingunregisterResource(string $type) : \Smarty_Internal_Templatebase
inherited_from | \Smarty_Internal_TemplateBase::unregisterResource() |
---|
string
name of resource type
\Smarty_Internal_Templatebase
current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chainingwriteCachedContent($content) : bool
bool
replaceCamelcase(string $match) : string
inherited_from | \Smarty_Internal_TemplateBase::replaceCamelcase() |
---|
string
match string
string
replacemant$_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