This is the main Smarty class
| package | Smarty |
|---|---|
| subpackage | Template |
__call(string $name, array $args)
| inherited_from | \Smarty_Internal_TemplateBase::__call() |
|---|
stringunknown method-name
arrayargument array
__clone()
__construct()
__destruct()
__get(string $name) : mixed
Calls the appropriate getter function. Issues an E_USER_NOTICE if no valid getter is found.
stringproperty name
mixed__set(string $name, mixed $value)
Calls the appropriate setter function. Issues an E_USER_NOTICE if no valid setter is found.
stringproperty name
mixedparameter passed to setter
_get_filter_name(callback $function_name) : string
| inherited_from | \Smarty_Internal_TemplateBase::_get_filter_name() |
|---|
callback
stringinternal filter nameaddAutoloadFilters(array $filters, string $type) : \Smarty
arrayfilters to load automatically
string"pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types
\Smartycurrent Smarty instance for chainingaddConfigDir(string | array $config_dir, string $key) : \Smarty
stringarraydirectory(s) of config sources
stringkey of the array element to assign the config dir to
\Smartycurrent Smarty instance for chainingaddDefaultModifiers(array | string $modifiers) : \Smarty
arraystringmodifier or list of modifiers to add
\Smartycurrent Smarty instance for chainingaddTemplateDir(string | array $template_dir, string $key) : \Smarty
stringarraydirectory(s) of template sources
stringof the array element to assign the template dir to
\SmartyException |
when the given template directory is not valid |
|---|
\Smartycurrent Smarty instance for chainingappend(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 chainingclearAllAssign() : \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 chainingclearAllCache(integer $exp_time, string $type) : integer
integerexpiration time
stringresource type
integernumber of cache files deletedclearAssign(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(string $template_name, string $cache_id, string $compile_id, integer $exp_time, string $type) : integer
stringtemplate name
stringcache id
stringcompile id
integerexpiration time
stringresource type
integernumber of cache files deletedclearCompiledTemplate(string $resource_name, string $compile_id, integer $exp_time) : integer
stringtemplate name
stringcompile id
integerexpiration time
integernumber of template 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 chainingcompileAllConfig($extention, bool $force_compile, int $time_limit, int $max_errors) : integer
boolforce all to recompile
int
int
integernumber of template files recompiledcompileAllTemplates($extention, bool $force_compile, int $time_limit, int $max_errors) : integer
boolforce all to recompile
int
int
integernumber of template files recompiledconfigLoad(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
createTemplate(string $template, mixed $cache_id, mixed $compile_id, object $parent, boolean $do_clone) : object
stringthe resource handle of the template file
mixedcache id to be used with this template
mixedcompile id to be used with this template
objectnext higher level of Smarty variables
booleanflag is Smarty object shall be cloned
objecttemplate objectdisplay(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
enableSecurity(string | \Smarty_Security $security_class) : \Smarty
\SmartyException |
when an invalid class name is provided |
|---|
\Smartycurrent Smarty instance for chainingfetch(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 outputgetAutoloadFilters(string $type) : array
stringtype of filter to get autoloads for. Defaults to all autoload filters
arrayarray( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type was specifiedgetCacheDir() : string
stringpath of cache directorygetCompileDir() : string
stringpath to compiled templatesgetConfigDir(mixed $index) : array | string
mixedindex of directory to get, null to get all
arraystringconfiguration directorygetConfigVariable(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 variablesgetDebugTemplate() : string
stringgetDefaultModifiers() : array
arraylist of default modifiersgetGlobal(string $varname) : string
stringvariable name or null
stringvariable value or or array of variablesgetPluginsDir() : array
arraylist of plugin directoriesgetRegisteredObject(string $name) : object
| inherited_from | \Smarty_Internal_TemplateBase::getRegisteredObject() |
|---|
stringobject name
\SmartyException |
if no such object is found |
|---|
objectgetStreamVariable(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 variablegetTags(\Smarty_Internal_Template $template) : array
arrayof tag/attributesgetTemplateDir(mixed $index) : array | string
mixedindex of directory to get, null to get all
arraystringlist of template directories, or directory of $indexgetTemplateVars(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 |
|---|
loadPlugin(string $plugin_name, bool $check) : string
stringclass plugin name to load
boolcheck if already loaded
string|boolean filepath of loaded file or falsemuteExpectedErrors() : void
mutingErrorHandler(integer $errno, $errstr, $errfile, $errline, $errcontext) : boolean
| link | http://php.net/set_error_handler |
|---|
integerError level
booleanregisterCacheResource(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 chainingsetAutoloadFilters(array $filters, string $type) : \Smarty
arrayfilters to load automatically
string"pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types
\Smartycurrent Smarty instance for chainingsetCacheDir(string $cache_dir) : \Smarty
stringdirectory to store cached templates in
\Smartycurrent Smarty instance for chainingsetCompileDir(string $compile_dir) : \Smarty
stringdirectory to store compiled templates in
\Smartycurrent Smarty instance for chainingsetDebugTemplate(string $tpl_name) : \Smarty
string
\SmartyException |
if file is not readable |
|---|
\Smartycurrent Smarty instance for chainingsetDefaultModifiers(array | string $modifiers) : \Smarty
arraystringmodifier or list of modifiers to set
\Smartycurrent Smarty instance for chainingsetPluginsDir(string | array $plugins_dir) : \Smarty
stringarraydirectory(s) of plugins
\Smartycurrent Smarty instance for chainingsetTemplateDir(string | array $template_dir) : \Smarty
stringarraydirectory(s) of template sources
\Smartycurrent Smarty instance for chainingtemplateExists(string $resource_name) : boolean
stringtemplate name
booleanstatustestInstall(array $errors) : boolean
arrayArray to write errors into, rather than outputting them
booleantrue if setup is fine, false if something is wrongunloadFilter(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 chainingunmuteExpectedErrors() : void
unregisterCacheResource(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 chainingreplaceCamelcase(string $match) : string
| inherited_from | \Smarty_Internal_TemplateBase::replaceCamelcase() |
|---|
stringmatch string
stringreplacemant$_CHARSET
"UTF-8")
$_DATE_FORMAT
$_IS_WINDOWS
$_MBSTRING
$_UTF8_MODIFIER
$_cacheresource_handlers : array
$_current_file : string
$_dir_perms : int
$_file_perms : int
$_muted_directories
$_parserdebug : bool
$_previous_error_handler
$_resource_handlers : array
$_smarty_vars : array
$_tag_stack : array
$allow_ambiguous_resources : boolean
$allow_php_templates : bool
$auto_literal : boolean
$autoload_filters : array
$cache_id : string
$cache_lifetime : integer
$cache_locking : boolean
$cache_modified_check : boolean
$caching : boolean
$caching_type : string
Must be an element of $cache_resource_types.
$compile_check : boolean
$compile_id : string
$compile_locking : boolean
$config_booleanize : boolean
$config_overwrite : boolean
$config_read_hidden : boolean
$config_vars : array
| inherited_from | \Smarty_Internal_Data::$$config_vars |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::$$config_vars |
$debug_tpl : string
$debugging : boolean
Setting this to true enables the debug-console.
$debugging_ctrl : string
$default_config_handler_func : callable
$default_config_type : string
$default_modifiers : array
$default_plugin_handler_func : callable
$default_resource_type : string
Must be an valid key of $registered_resources.
$default_template_handler_func : callable
$direct_access_security : boolean
{@internal Currently used by Smarty_Internal_Template only. }}
$error_reporting : int
$error_unassigned : boolean
$escape_html : boolean
$force_cache : boolean
$force_compile : boolean
$global_tpl_vars
$joined_config_dir : string
$joined_template_dir : string
$left_delimiter : string
$locking_timeout : float
$merge_compiled_includes : boolean
$merged_templates_func : array
$parent : \Smarty_Internal_Template
| inherited_from | \Smarty_Internal_Data::$$parent |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::$$parent |
$php_handling : integer
$plugin_search_order : array
$properties : array
$registered_cache_resources : array
$registered_classes : array
$registered_filters : array
$registered_objects : array
$registered_plugins : array
$registered_resources : array
$right_delimiter : string
$security_class : string
This should be instance of Smarty_Security.
| see | \Smarty_Security |
|---|
$security_policy : \Smarty_Security
$smarty : \Smarty
$smarty_debug_id : \type
Only used when $debugging_ctrl is set to 'URL'. The name of the URL-parameter that activates debugging.
$start_time : int
$template_class : string
| inherited_from | \Smarty_Internal_Data::$$template_class |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::$$template_class |
$template_functions : array
$template_objects : array
$tpl_vars : array
| inherited_from | \Smarty_Internal_Data::$$tpl_vars |
|---|---|
| inherited_from | \Smarty_Internal_TemplateBase::$$tpl_vars |
$use_include_path : boolean
$use_sub_dirs : boolean
$cache_dir : string
$compile_dir : string
$config_dir : array
$plugins_dir : array
$template_dir : array
CACHING_LIFETIME_CURRENT
CACHING_LIFETIME_SAVED
CACHING_OFF
COMPILECHECK_CACHEMISS
COMPILECHECK_OFF
COMPILECHECK_ON
FILTER_OUTPUT
FILTER_POST
FILTER_PRE
FILTER_VARIABLE
PHP_ALLOW
PHP_PASSTHRU
.. ?>" tags in templates.
PHP_QUOTE
PHP_REMOVE
PLUGIN_BLOCK
PLUGIN_COMPILER
PLUGIN_FUNCTION
PLUGIN_MODIFIER
PLUGIN_MODIFIERCOMPILER
SCOPE_GLOBAL
SCOPE_LOCAL
SCOPE_PARENT
SCOPE_ROOT
SMARTY_VERSION