| package |
Smarty |
| subpackage |
Template |
Methods
Handle unknown class methods
__call(string $name, array $args)
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::__call() |
| inherited_from |
\Smarty::__call() |
Parameters
$name
stringunknown method-name
$args
arrayargument array
<<magic>> set selfpointer on cloned object
__clone()
Inherited
| inherited_from |
\Smarty::__clone() |
Initialize new SmartyBC object
__construct(array $options)
Parameters
$options
arrayoptions to set during initialization, e.g. array( 'forceCompile' => false )
Class destructor
__destruct()
Inherited
| inherited_from |
\Smarty::__destruct() |
<<magic>> Generic getter.
__get(string $name) : mixed
Inherited
Calls the appropriate getter function.
Issues an E_USER_NOTICE if no valid getter is found.
| inherited_from |
\Smarty::__get() |
Parameters
$name
stringproperty name
Returns
mixed
<<magic>> Generic setter.
__set(string $name, mixed $value)
Inherited
Calls the appropriate setter function.
Issues an E_USER_NOTICE if no valid setter is found.
| inherited_from |
\Smarty::__set() |
Parameters
$name
stringproperty name
$value
mixedparameter passed to setter
Return internal filter name
_get_filter_name(callback $function_name) : string
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::_get_filter_name() |
| inherited_from |
\Smarty::_get_filter_name() |
Parameters
$function_name
callback
Returns
stringinternal filter name
Add autoload filters
addAutoloadFilters(array $filters, string $type) : \Smarty
Inherited
| inherited_from |
\Smarty::addAutoloadFilters() |
Parameters
$filters
arrayfilters to load automatically
$type
string"pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types
Returns
\Smartycurrent Smarty instance for chaining
Add config directory(s)
addConfigDir(string | array $config_dir, string $key) : \Smarty
Inherited
| inherited_from |
\Smarty::addConfigDir() |
Parameters
$config_dir
stringarraydirectory(s) of config sources
$key
stringkey of the array element to assign the config dir to
Returns
\Smartycurrent Smarty instance for chaining
Add default modifiers
addDefaultModifiers(array | string $modifiers) : \Smarty
Inherited
| inherited_from |
\Smarty::addDefaultModifiers() |
Parameters
$modifiers
arraystringmodifier or list of modifiers to add
Returns
\Smartycurrent Smarty instance for chaining
Adds directory of plugin files
addPluginsDir($plugins_dir) : \Smarty
Inherited
| inherited_from |
\Smarty::addPluginsDir() |
Parameters
$plugins_dir
Returns
\Smartycurrent Smarty instance for chaining
Add template directory(s)
addTemplateDir(string | array $template_dir, string $key) : \Smarty
Inherited
| inherited_from |
\Smarty::addTemplateDir() |
Parameters
$template_dir
stringarraydirectory(s) of template sources
$key
stringof the array element to assign the template dir to
Exceptions
Returns
\Smartycurrent Smarty instance for chaining
appends values to template variables
append(array | string $tpl_var, mixed $value, boolean $merge, boolean $nocache) : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::append() |
| inherited_from |
\Smarty_Internal_TemplateBase::append() |
| inherited_from |
\Smarty::append() |
Parameters
$tpl_var
arraystringthe template variable name(s)
$value
mixedthe value to append
$merge
booleanflag if array elements shall be merged
$nocache
booleanif true any output of this variable will be not cached
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
appends values to template variables by reference
appendByRef(string $tpl_var, mixed $value, boolean $merge) : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::appendByRef() |
| inherited_from |
\Smarty_Internal_TemplateBase::appendByRef() |
| inherited_from |
\Smarty::appendByRef() |
Parameters
$tpl_var
stringthe template variable name
$value
mixed&$value the referenced value to append
$merge
booleanflag if array elements shall be merged
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
wrapper for append_by_ref
append_by_ref(string $tpl_var, mixed $value, boolean $merge)
Parameters
$tpl_var
stringthe template variable name
$value
mixed&$value the referenced value to append
$merge
booleanflag if array elements shall be merged
assigns a Smarty variable
assign(array | string $tpl_var, mixed $value, boolean $nocache) : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::assign() |
| inherited_from |
\Smarty_Internal_TemplateBase::assign() |
| inherited_from |
\Smarty::assign() |
Parameters
$tpl_var
arraystringthe template variable name(s)
$value
mixedthe value to assign
$nocache
booleanif true any output of this variable will be not cached
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
assigns values to template variables by reference
assignByRef(string $tpl_var, $value, boolean $nocache) : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::assignByRef() |
| inherited_from |
\Smarty_Internal_TemplateBase::assignByRef() |
| inherited_from |
\Smarty::assignByRef() |
Parameters
$tpl_var
stringthe template variable name
$value
$nocache
booleanif true any output of this variable will be not cached
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
assigns a global Smarty variable
assignGlobal(string $varname, mixed $value, boolean $nocache) : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::assignGlobal() |
| inherited_from |
\Smarty_Internal_TemplateBase::assignGlobal() |
| inherited_from |
\Smarty::assignGlobal() |
Parameters
$varname
stringthe global variable name
$value
mixedthe value to assign
$nocache
booleanif true any output of this variable will be not cached
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
wrapper for assign_by_ref
assign_by_ref(string $tpl_var, mixed $value)
Parameters
$tpl_var
stringthe template variable name
$value
mixed&$value the referenced value to assign
clear all the assigned template variables.
clearAllAssign() : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::clearAllAssign() |
| inherited_from |
\Smarty_Internal_TemplateBase::clearAllAssign() |
| inherited_from |
\Smarty::clearAllAssign() |
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
Empty cache folder
clearAllCache(integer $exp_time, string $type) : integer
Inherited
| inherited_from |
\Smarty::clearAllCache() |
Parameters
$exp_time
integerexpiration time
$type
stringresource type
Returns
integernumber of cache files deleted
clear the given assigned template variable.
clearAssign(string | array $tpl_var) : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::clearAssign() |
| inherited_from |
\Smarty_Internal_TemplateBase::clearAssign() |
| inherited_from |
\Smarty::clearAssign() |
Parameters
$tpl_var
stringarraythe template variable(s) to clear
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
Empty cache for a specific template
clearCache(string $template_name, string $cache_id, string $compile_id, integer $exp_time, string $type) : integer
Inherited
| inherited_from |
\Smarty::clearCache() |
Parameters
$template_name
stringtemplate name
$compile_id
stringcompile id
$exp_time
integerexpiration time
$type
stringresource type
Returns
integernumber of cache files deleted
Delete compiled template file
clearCompiledTemplate(string $resource_name, string $compile_id, integer $exp_time) : integer
Inherited
| inherited_from |
\Smarty::clearCompiledTemplate() |
Parameters
$resource_name
stringtemplate name
$compile_id
stringcompile id
$exp_time
integerexpiration time
Returns
integernumber of template files deleted
Deassigns a single or all config variables
clearConfig(string $varname) : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::clearConfig() |
| inherited_from |
\Smarty_Internal_TemplateBase::clearConfig() |
| inherited_from |
\Smarty::clearConfig() |
Parameters
$varname
stringvariable name or null
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
clear all the assigned template variables.
clear_all_assign()
clear the entire contents of cache (all templates)
clear_all_cache(string $exp_time) : boolean
Parameters
$exp_time
stringexpire time
Returns
boolean
clear the given assigned template variable.
clear_assign(string $tpl_var)
Parameters
$tpl_var
stringthe template variable to clear
clear cached content for the given template and cache id
clear_cache(string $tpl_file, string $cache_id, string $compile_id, string $exp_time) : boolean
Parameters
$tpl_file
stringname of template file
$cache_id
stringname of cache_id
$compile_id
stringname of compile_id
$exp_time
stringexpiration time
Returns
boolean
clears compiled version of specified template resource,
or all compiled template files if one is not specified.
clear_compiled_tpl(string $tpl_file, string $compile_id, string $exp_time) : boolean
This function is for advanced use only, not normally needed.
Parameters
$tpl_file
string
$compile_id
string
$exp_time
string
Returns
booleanresults of {@link smarty_core_rm_auto()}
clear configuration values
clear_config(string $var)
Compile all config files
compileAllConfig($extention, bool $force_compile, int $time_limit, int $max_errors) : integer
Inherited
| inherited_from |
\Smarty::compileAllConfig() |
Parameters
$extention
$force_compile
boolforce all to recompile
$time_limit
int
$max_errors
int
Returns
integernumber of template files recompiled
Compile all template files
compileAllTemplates($extention, bool $force_compile, int $time_limit, int $max_errors) : integer
Inherited
| inherited_from |
\Smarty::compileAllTemplates() |
Parameters
$extention
$force_compile
boolforce all to recompile
$time_limit
int
$max_errors
int
Returns
integernumber of template files recompiled
load a config file, optionally load just selected sections
configLoad(string $config_file, mixed $sections) : \Smarty_Internal_Data
Inherited
| inherited_from |
\Smarty_Internal_Data::configLoad() |
| inherited_from |
\Smarty_Internal_TemplateBase::configLoad() |
| inherited_from |
\Smarty::configLoad() |
Parameters
$config_file
stringfilename
$sections
mixedarray of section names, single section or null
Returns
\Smarty_Internal_Datacurrent Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
load configuration values
config_load(string $file, string $section, string $scope)
Parameters
$file
string
$section
string
$scope
string
creates a data object
createData(object $parent)
Inherited
| returns |
Smarty_Data data object |
| inherited_from |
\Smarty_Internal_TemplateBase::createData() |
| inherited_from |
\Smarty::createData() |
Parameters
$parent
objectnext higher level of Smarty variables
creates a template object
createTemplate(string $template, mixed $cache_id, mixed $compile_id, object $parent, boolean $do_clone) : object
Inherited
| inherited_from |
\Smarty::createTemplate() |
Parameters
$template
stringthe resource handle of the template file
$cache_id
mixedcache id to be used with this template
$compile_id
mixedcompile id to be used with this template
$parent
objectnext higher level of Smarty variables
$do_clone
booleanflag is Smarty object shall be cloned
Returns
objecttemplate object
Disable security
disableSecurity() : \Smarty
Inherited
| inherited_from |
\Smarty::disableSecurity() |
Returns
\Smartycurrent Smarty instance for chaining
displays a Smarty template
display(string $template, mixed $cache_id, mixed $compile_id, object $parent)
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::display() |
| inherited_from |
\Smarty::display() |
Parameters
$template
stringthe resource handle of the template file or template object
$cache_id
mixedcache id to be used with this template
$compile_id
mixedcompile id to be used with this template
$parent
objectnext higher level of Smarty variables
Loads security class and enables security
enableSecurity(string | \Smarty_Security $security_class) : \Smarty
Inherited
| inherited_from |
\Smarty::enableSecurity() |
Parameters
$security_class
string\Smarty_Securityif a string is used, it must be class-name
Exceptions
Returns
\Smartycurrent Smarty instance for chaining
fetches a rendered Smarty template
fetch(string $template, mixed $cache_id, mixed $compile_id, object $parent, bool $display, bool $merge_tpl_vars, bool $no_output_filter) : string
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::fetch() |
| inherited_from |
\Smarty::fetch() |
Parameters
$template
stringthe resource handle of the template file or template object
$cache_id
mixedcache id to be used with this template
$compile_id
mixedcompile id to be used with this template
$parent
objectnext higher level of Smarty variables
$display
booltrue: display, false: fetch
$merge_tpl_vars
boolif true parent template variables merged in to local scope
$no_output_filter
boolif true do not run output filter
Returns
stringrendered template output
Get autoload filters
getAutoloadFilters(string $type) : array
Inherited
| inherited_from |
\Smarty::getAutoloadFilters() |
Parameters
$type
stringtype of filter to get autoloads for. Defaults to all autoload filters
Returns
arrayarray( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type was specified
Get cache directory
getCacheDir() : string
Inherited
| inherited_from |
\Smarty::getCacheDir() |
Returns
stringpath of cache directory
Get compiled directory
getCompileDir() : string
Inherited
| inherited_from |
\Smarty::getCompileDir() |
Returns
stringpath to compiled templates
Get config directory
getConfigDir(mixed $index) : array | string
Inherited
| inherited_from |
\Smarty::getConfigDir() |
Parameters
$index
mixedindex of directory to get, null to get all
Returns
arraystringconfiguration directory
gets a config variable
getConfigVariable(string $variable, $error_enable) : mixed
Inherited
| inherited_from |
\Smarty_Internal_Data::getConfigVariable() |
| inherited_from |
\Smarty_Internal_TemplateBase::getConfigVariable() |
| inherited_from |
\Smarty::getConfigVariable() |
Parameters
$variable
stringthe name of the config variable
$error_enable
Returns
mixedthe value of the config variable
Returns a single or all config variables
getConfigVars(string $varname, $search_parents) : string
Inherited
| inherited_from |
\Smarty_Internal_Data::getConfigVars() |
| inherited_from |
\Smarty_Internal_TemplateBase::getConfigVars() |
| inherited_from |
\Smarty::getConfigVars() |
Parameters
$varname
stringvariable name or null
$search_parents
Returns
stringvariable value or or array of variables
return name of debugging template
getDebugTemplate() : string
Inherited
| inherited_from |
\Smarty::getDebugTemplate() |
Returns
string
Get default modifiers
getDefaultModifiers() : array
Inherited
| inherited_from |
\Smarty::getDefaultModifiers() |
Returns
arraylist of default modifiers
Returns a single or all global variables
getGlobal(string $varname) : string
Inherited
| inherited_from |
\Smarty::getGlobal() |
Parameters
$varname
stringvariable name or null
Returns
stringvariable value or or array of variables
Get plugin directories
getPluginsDir() : array
Inherited
| inherited_from |
\Smarty::getPluginsDir() |
Returns
arraylist of plugin directories
return a reference to a registered object
getRegisteredObject(string $name) : object
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::getRegisteredObject() |
| inherited_from |
\Smarty::getRegisteredObject() |
Parameters
Exceptions
Returns
object
gets a stream variable
getStreamVariable(string $variable) : mixed
Inherited
| inherited_from |
\Smarty_Internal_Data::getStreamVariable() |
| inherited_from |
\Smarty_Internal_TemplateBase::getStreamVariable() |
| inherited_from |
\Smarty::getStreamVariable() |
Parameters
$variable
stringthe stream of the variable
Returns
mixedthe value of the stream variable
Get template directories
getTemplateDir(mixed $index) : array | string
Inherited
| inherited_from |
\Smarty::getTemplateDir() |
Parameters
$index
mixedindex of directory to get, null to get all
Returns
arraystringlist of template directories, or directory of $index
Returns a single or all template variables
getTemplateVars(string $varname, string $_ptr, boolean $search_parents) : string
Inherited
| inherited_from |
\Smarty_Internal_Data::getTemplateVars() |
| inherited_from |
\Smarty_Internal_TemplateBase::getTemplateVars() |
| inherited_from |
\Smarty::getTemplateVars() |
Parameters
$varname
stringvariable name or null
$_ptr
stringoptional pointer to data object
$search_parents
booleaninclude parent templates?
Returns
stringvariable value or or array of variables
gets the object of a Smarty variable
getVariable(string $variable, object $_ptr, boolean $search_parents, $error_enable) : object
Inherited
| inherited_from |
\Smarty_Internal_Data::getVariable() |
| inherited_from |
\Smarty_Internal_TemplateBase::getVariable() |
| inherited_from |
\Smarty::getVariable() |
Parameters
$variable
stringthe name of the Smarty variable
$_ptr
objectoptional pointer to data object
$search_parents
booleansearch also in parent data
$error_enable
Returns
objectthe object of the variable
Returns an array containing config variables
get_config_vars(string $name) : array
Parameters
$name
string
Returns
array
return a reference to a registered object
get_registered_object(string $name) : object
Parameters
$name
string
Returns
object
Returns an array containing template variables
get_template_vars(string $name) : array
Parameters
$name
string
Returns
array
test if cache is valid
isCached(string | object $template, mixed $cache_id, mixed $compile_id, object $parent) : boolean
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::isCached() |
| inherited_from |
\Smarty::isCached() |
Parameters
$template
stringobjectthe resource handle of the template file or template object
$cache_id
mixedcache id to be used with this template
$compile_id
mixedcompile id to be used with this template
$parent
objectnext higher level of Smarty variables
Returns
booleancache status
test to see if valid cache exists for this template
is_cached(string $tpl_file, string $cache_id, string $compile_id) : boolean
Parameters
$tpl_file
stringname of template file
$cache_id
string
$compile_id
string
Returns
boolean
load a filter of specified type and name
loadFilter(string $type, string $name)
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::loadFilter() |
| inherited_from |
\Smarty::loadFilter() |
Parameters
Exceptions
Takes unknown classes and loads plugin files for them
class name format: Smarty_PluginType_PluginName
plugin filename format: plugintype.pluginname.php
loadPlugin(string $plugin_name, bool $check) : string
Inherited
| inherited_from |
\Smarty::loadPlugin() |
Parameters
$plugin_name
stringclass plugin name to load
$check
boolcheck if already loaded
Returns
string|boolean filepath of loaded file or false
load a filter of specified type and name
load_filter(string $type, string $name)
Enable error handler to mute expected messages
muteExpectedErrors() : void
InheritedStatic
| inherited_from |
\Smarty::muteExpectedErrors() |
Error Handler to mute expected messages
mutingErrorHandler(integer $errno, $errstr, $errfile, $errline, $errcontext) : boolean
InheritedStatic
Parameters
$errno
integerError level
$errstr
$errfile
$errline
$errcontext
Returns
boolean
Registers a cache resource to cache a template's output
registerCacheResource(string $type, \Smarty_CacheResource $callback) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerCacheResource() |
| inherited_from |
\Smarty::registerCacheResource() |
Parameters
$type
stringname of cache resource type
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers static classes to be used in templates
registerClass($class_name, string $class_impl) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerClass() |
| inherited_from |
\Smarty::registerClass() |
Parameters
$class_name
$class_impl
stringthe referenced PHP class to register
Exceptions
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers a default template handler
registerDefaultConfigHandler(callable $callback) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerDefaultConfigHandler() |
| inherited_from |
\Smarty::registerDefaultConfigHandler() |
Parameters
$callback
callableclass/method name
Exceptions
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers a default plugin handler
registerDefaultPluginHandler(callable $callback) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerDefaultPluginHandler() |
| inherited_from |
\Smarty::registerDefaultPluginHandler() |
Parameters
$callback
callableclass/method name
Exceptions
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers a default template handler
registerDefaultTemplateHandler(callable $callback) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerDefaultTemplateHandler() |
| inherited_from |
\Smarty::registerDefaultTemplateHandler() |
Parameters
$callback
callableclass/method name
Exceptions
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers a filter function
registerFilter(string $type, callback $callback) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerFilter() |
| inherited_from |
\Smarty::registerFilter() |
Parameters
$callback
callback
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers object to be used in templates
registerObject($object_name, object $object_impl, array $allowed, boolean $smarty_args, array $block_methods) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerObject() |
| inherited_from |
\Smarty::registerObject() |
Parameters
$object_name
$object_impl
objectthe referenced PHP object to register
$allowed
arraylist of allowed methods (empty = all)
$smarty_args
booleansmarty argument format, else traditional
$block_methods
arraylist of block-methods
Exceptions
\SmartyException |
if any of the methods in $allowed or $block_methods are invalid |
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers plugin to be used in templates
registerPlugin(string $type, string $tag, callback $callback, boolean $cacheable, array $cache_attr) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerPlugin() |
| inherited_from |
\Smarty::registerPlugin() |
Parameters
$tag
stringname of template tag
$callback
callbackPHP callback to register
$cacheable
booleanif true (default) this fuction is cachable
$cache_attr
arraycaching attributes if any
Exceptions
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers a resource to fetch a template
registerResource(string $type, \Smarty_Resource | array $callback) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::registerResource() |
| inherited_from |
\Smarty::registerResource() |
Parameters
$type
stringname of resource type
$callback
\Smarty_Resourcearrayor instance of Smarty_Resource, or array of callbacks to handle resource (deprecated)
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Registers block function to be used in templates
register_block(string $block, string $block_impl, bool $cacheable, mixed $cache_attrs)
Parameters
$block
stringname of template block
$block_impl
stringPHP function to register
$cacheable
bool
$cache_attrs
mixed
Registers compiler function
register_compiler_function(string $function, string $function_impl, bool $cacheable)
Parameters
$function
stringname of template function
$function_impl
stringname of PHP function to register
$cacheable
bool
Registers custom function to be used in templates
register_function(string $function, string $function_impl, bool $cacheable, mixed $cache_attrs)
Parameters
$function
stringthe name of the template function
$function_impl
stringthe name of the PHP function to register
$cacheable
bool
$cache_attrs
mixed
Registers modifier to be used in templates
register_modifier(string $modifier, string $modifier_impl)
Parameters
$modifier
stringname of template modifier
$modifier_impl
stringname of PHP function to register
Registers object to be used in templates
register_object(string $object, object $object_impl, array $allowed, boolean $smarty_args, $block_methods)
Parameters
$object
stringname of template object
$object_impl
objectthe referenced PHP object to register
$allowed
arraylist of allowed methods (empty = all)
$smarty_args
booleansmarty argument format, else traditional
$block_methods
Registers an output filter function to apply
to a template output
register_outputfilter(callable $function)
Parameters
$function
callable
Registers a postfilter function to apply
to a compiled template after compilation
register_postfilter(callable $function)
Parameters
$function
callable
Registers a prefilter function to apply
to a template before compiling
register_prefilter(callable $function)
Parameters
$function
callable
Registers a resource to fetch a template
register_resource(string $type, array $functions)
Parameters
$type
stringname of resource
$functions
arrayarray of functions to handle resource
Set autoload filters
setAutoloadFilters(array $filters, string $type) : \Smarty
Inherited
| inherited_from |
\Smarty::setAutoloadFilters() |
Parameters
$filters
arrayfilters to load automatically
$type
string"pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types
Returns
\Smartycurrent Smarty instance for chaining
Set cache directory
setCacheDir(string $cache_dir) : \Smarty
Inherited
| inherited_from |
\Smarty::setCacheDir() |
Parameters
$cache_dir
stringdirectory to store cached templates in
Returns
\Smartycurrent Smarty instance for chaining
Set compile directory
setCompileDir(string $compile_dir) : \Smarty
Inherited
| inherited_from |
\Smarty::setCompileDir() |
Parameters
$compile_dir
stringdirectory to store compiled templates in
Returns
\Smartycurrent Smarty instance for chaining
Set config directory
setConfigDir($config_dir) : \Smarty
Inherited
| inherited_from |
\Smarty::setConfigDir() |
Parameters
$config_dir
Returns
\Smartycurrent Smarty instance for chaining
set the debug template
setDebugTemplate(string $tpl_name) : \Smarty
Inherited
| inherited_from |
\Smarty::setDebugTemplate() |
Parameters
$tpl_name
string
Exceptions
Returns
\Smartycurrent Smarty instance for chaining
Set default modifiers
setDefaultModifiers(array | string $modifiers) : \Smarty
Inherited
| inherited_from |
\Smarty::setDefaultModifiers() |
Parameters
$modifiers
arraystringmodifier or list of modifiers to set
Returns
\Smartycurrent Smarty instance for chaining
Set plugins directory
setPluginsDir(string | array $plugins_dir) : \Smarty
Inherited
| inherited_from |
\Smarty::setPluginsDir() |
Parameters
$plugins_dir
stringarraydirectory(s) of plugins
Returns
\Smartycurrent Smarty instance for chaining
Set template directory
setTemplateDir(string | array $template_dir) : \Smarty
Inherited
| inherited_from |
\Smarty::setTemplateDir() |
Parameters
$template_dir
stringarraydirectory(s) of template sources
Returns
\Smartycurrent Smarty instance for chaining
Check if a template resource exists
templateExists(string $resource_name) : boolean
Inherited
| inherited_from |
\Smarty::templateExists() |
Parameters
$resource_name
stringtemplate name
Returns
booleanstatus
Checks whether requested template exists.
template_exists(string $tpl_file) : boolean
Parameters
$tpl_file
string
Returns
boolean
Run installation test
testInstall(array $errors) : boolean
Inherited
| inherited_from |
\Smarty::testInstall() |
Parameters
$errors
arrayArray to write errors into, rather than outputting them
Returns
booleantrue if setup is fine, false if something is wrong
trigger Smarty error
trigger_error(string $error_msg, integer $error_type)
Parameters
$error_msg
string
$error_type
integer
unload a filter of specified type and name
unloadFilter(string $type, string $name) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::unloadFilter() |
| inherited_from |
\Smarty::unloadFilter() |
Parameters
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Disable error handler muting expected messages
unmuteExpectedErrors() : void
InheritedStatic
| inherited_from |
\Smarty::unmuteExpectedErrors() |
Unregisters a cache resource
unregisterCacheResource(string $type) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::unregisterCacheResource() |
| inherited_from |
\Smarty::unregisterCacheResource() |
Parameters
$type
stringname of cache resource type
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Unregisters a filter function
unregisterFilter(string $type, callback $callback) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::unregisterFilter() |
| inherited_from |
\Smarty::unregisterFilter() |
Parameters
$callback
callback
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
unregister an object
unregisterObject(string $name) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::unregisterObject() |
| inherited_from |
\Smarty::unregisterObject() |
Parameters
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Unregister Plugin
unregisterPlugin(string $type, string $tag) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::unregisterPlugin() |
| inherited_from |
\Smarty::unregisterPlugin() |
Parameters
$tag
stringname of plugin
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Unregisters a resource
unregisterResource(string $type) : \Smarty_Internal_Templatebase
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::unregisterResource() |
| inherited_from |
\Smarty::unregisterResource() |
Parameters
$type
stringname of resource type
Returns
\Smarty_Internal_Templatebasecurrent Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
Unregisters block function
unregister_block(string $block)
Parameters
$block
stringname of template function
Unregisters compiler function
unregister_compiler_function(string $function)
Parameters
$function
stringname of template function
Unregisters custom function
unregister_function(string $function)
Parameters
$function
stringname of template function
Unregisters modifier
unregister_modifier(string $modifier)
Parameters
$modifier
stringname of template modifier
Unregisters object
unregister_object(string $object)
Parameters
$object
stringname of template object
Unregisters an outputfilter function
unregister_outputfilter(callable $function)
Parameters
$function
callable
Unregisters a postfilter function
unregister_postfilter(callable $function)
Parameters
$function
callable
Unregisters a prefilter function
unregister_prefilter(callable $function)
Parameters
$function
callable
Unregisters a resource
unregister_resource(string $type)
Parameters
$type
stringname of resource
preg_replace callback to convert camelcase getter/setter to underscore property names
replaceCamelcase(string $match) : string
Inherited
| inherited_from |
\Smarty_Internal_TemplateBase::replaceCamelcase() |
| inherited_from |
\Smarty::replaceCamelcase() |
Parameters
$match
stringmatch string
Returns
stringreplacemant
Properties
$_CHARSET
Inherited
| inherited_from |
\Smarty::$$_CHARSET |
$_IS_WINDOWS
Inherited
| inherited_from |
\Smarty::$$_IS_WINDOWS |
$_MBSTRING
Inherited
| inherited_from |
\Smarty::$$_MBSTRING |
$_UTF8_MODIFIER
Inherited
| inherited_from |
\Smarty::$$_UTF8_MODIFIER |
$_cacheresource_handlers : array
Inherited
| inherited_from |
\Smarty::$$_cacheresource_handlers |
$_current_file : string
Inherited
| inherited_from |
\Smarty::$$_current_file |
$_dir_perms : int
Inherited
| inherited_from |
\Smarty::$$_dir_perms |
$_file_perms : int
Inherited
| inherited_from |
\Smarty::$$_file_perms |
$_muted_directories
Inherited
| inherited_from |
\Smarty::$$_muted_directories |
$_parserdebug : bool
Inherited
| inherited_from |
\Smarty::$$_parserdebug |
$_previous_error_handler
Inherited
| inherited_from |
\Smarty::$$_previous_error_handler |
$_resource_handlers : array
Inherited
| inherited_from |
\Smarty::$$_resource_handlers |
$_smarty_vars : array
Inherited
| inherited_from |
\Smarty::$$_smarty_vars |
$_tag_stack : array
Inherited
| inherited_from |
\Smarty::$$_tag_stack |
$allow_ambiguous_resources : boolean
Inherited
| inherited_from |
\Smarty::$$allow_ambiguous_resources |
$allow_php_templates : bool
Inherited
| inherited_from |
\Smarty::$$allow_php_templates |
$auto_literal : boolean
Inherited
| inherited_from |
\Smarty::$$auto_literal |
$autoload_filters : array
Inherited
| inherited_from |
\Smarty::$$autoload_filters |
$cache_id : string
Inherited
| inherited_from |
\Smarty::$$cache_id |
$cache_lifetime : integer
Inherited
| inherited_from |
\Smarty::$$cache_lifetime |
$cache_locking : boolean
Inherited
| inherited_from |
\Smarty::$$cache_locking |
$cache_modified_check : boolean
Inherited
| inherited_from |
\Smarty::$$cache_modified_check |
$caching : boolean
Inherited
| inherited_from |
\Smarty::$$caching |
$caching_type : string
Inherited
Must be an element of $cache_resource_types.
| inherited_from |
\Smarty::$$caching_type |
$compile_check : boolean
Inherited
| inherited_from |
\Smarty::$$compile_check |
$compile_id : string
Inherited
| inherited_from |
\Smarty::$$compile_id |
$compile_locking : boolean
Inherited
| inherited_from |
\Smarty::$$compile_locking |
$config_booleanize : boolean
Inherited
| inherited_from |
\Smarty::$$config_booleanize |
$config_overwrite : boolean
Inherited
| inherited_from |
\Smarty::$$config_overwrite |
$config_read_hidden : boolean
Inherited
| inherited_from |
\Smarty::$$config_read_hidden |
$config_vars : array
Inherited
| inherited_from |
\Smarty_Internal_Data::$$config_vars |
| inherited_from |
\Smarty_Internal_TemplateBase::$$config_vars |
| inherited_from |
\Smarty::$$config_vars |
$debug_tpl : string
Inherited
| inherited_from |
\Smarty::$$debug_tpl |
$debugging : boolean
Inherited
Setting this to true enables the debug-console.
| inherited_from |
\Smarty::$$debugging |
$debugging_ctrl : string
Inherited
- NONE => no debugging control allowed
- URL => enable debugging when SMARTY_DEBUG is found in the URL.
| inherited_from |
\Smarty::$$debugging_ctrl |
$default_config_handler_func : callable
Inherited
| inherited_from |
\Smarty::$$default_config_handler_func |
$default_config_type : string
Inherited
| inherited_from |
\Smarty::$$default_config_type |
$default_modifiers : array
Inherited
| inherited_from |
\Smarty::$$default_modifiers |
$default_plugin_handler_func : callable
Inherited
| inherited_from |
\Smarty::$$default_plugin_handler_func |
$default_resource_type : string
Inherited
Must be an valid key of $registered_resources.
| inherited_from |
\Smarty::$$default_resource_type |
$default_template_handler_func : callable
Inherited
| inherited_from |
\Smarty::$$default_template_handler_func |
$direct_access_security : boolean
Inherited
{@internal
Currently used by Smarty_Internal_Template only.
}}
| inherited_from |
\Smarty::$$direct_access_security |
$error_reporting : int
Inherited
| inherited_from |
\Smarty::$$error_reporting |
$error_unassigned : boolean
Inherited
| inherited_from |
\Smarty::$$error_unassigned |
$escape_html : boolean
Inherited
| inherited_from |
\Smarty::$$escape_html |
$force_cache : boolean
Inherited
| inherited_from |
\Smarty::$$force_cache |
$force_compile : boolean
Inherited
| inherited_from |
\Smarty::$$force_compile |
$global_tpl_vars
Inherited
| inherited_from |
\Smarty::$$global_tpl_vars |
$joined_config_dir : string
Inherited
| inherited_from |
\Smarty::$$joined_config_dir |
$joined_template_dir : string
Inherited
| inherited_from |
\Smarty::$$joined_template_dir |
$left_delimiter : string
Inherited
| inherited_from |
\Smarty::$$left_delimiter |
$locking_timeout : float
Inherited
| inherited_from |
\Smarty::$$locking_timeout |
$merge_compiled_includes : boolean
Inherited
| inherited_from |
\Smarty::$$merge_compiled_includes |
$merged_templates_func : array
Inherited
| inherited_from |
\Smarty::$$merged_templates_func |
$parent : \Smarty_Internal_Template
Inherited
| inherited_from |
\Smarty_Internal_Data::$$parent |
| inherited_from |
\Smarty_Internal_TemplateBase::$$parent |
| inherited_from |
\Smarty::$$parent |
$php_handling : integer
Inherited
| inherited_from |
\Smarty::$$php_handling |
$plugin_search_order : array
Inherited
| inherited_from |
\Smarty::$$plugin_search_order |
$properties : array
Inherited
| inherited_from |
\Smarty::$$properties |
$registered_cache_resources : array
Inherited
| inherited_from |
\Smarty::$$registered_cache_resources |
$registered_classes : array
Inherited
| inherited_from |
\Smarty::$$registered_classes |
$registered_filters : array
Inherited
| inherited_from |
\Smarty::$$registered_filters |
$registered_objects : array
Inherited
| inherited_from |
\Smarty::$$registered_objects |
$registered_plugins : array
Inherited
| inherited_from |
\Smarty::$$registered_plugins |
$registered_resources : array
Inherited
| inherited_from |
\Smarty::$$registered_resources |
$right_delimiter : string
Inherited
| inherited_from |
\Smarty::$$right_delimiter |
$security_class : string
Inherited
This should be instance of Smarty_Security.
$security_policy : \Smarty_Security
Inherited
| inherited_from |
\Smarty::$$security_policy |
$smarty : \Smarty
Inherited
| inherited_from |
\Smarty::$$smarty |
$smarty_debug_id : \type
Inherited
Only used when $debugging_ctrl is set to 'URL'.
The name of the URL-parameter that activates debugging.
| inherited_from |
\Smarty::$$smarty_debug_id |
$start_time : int
Inherited
| inherited_from |
\Smarty::$$start_time |
$template_class : string
Inherited
| inherited_from |
\Smarty_Internal_Data::$$template_class |
| inherited_from |
\Smarty_Internal_TemplateBase::$$template_class |
| inherited_from |
\Smarty::$$template_class |
$template_functions : array
Inherited
| inherited_from |
\Smarty::$$template_functions |
$template_objects : array
Inherited
| inherited_from |
\Smarty::$$template_objects |
$tpl_vars : array
Inherited
| inherited_from |
\Smarty_Internal_Data::$$tpl_vars |
| inherited_from |
\Smarty_Internal_TemplateBase::$$tpl_vars |
| inherited_from |
\Smarty::$$tpl_vars |
$use_include_path : boolean
Inherited
| inherited_from |
\Smarty::$$use_include_path |
$use_sub_dirs : boolean
Inherited
| inherited_from |
\Smarty::$$use_sub_dirs |
$cache_dir : string
Inherited
| inherited_from |
\Smarty::$$cache_dir |
$compile_dir : string
Inherited
| inherited_from |
\Smarty::$$compile_dir |
$config_dir : array
Inherited
| inherited_from |
\Smarty::$$config_dir |
$plugins_dir : array
Inherited
| inherited_from |
\Smarty::$$plugins_dir |
$template_dir : array
Inherited
| inherited_from |
\Smarty::$$template_dir |
Constants
CACHING_LIFETIME_CURRENT
CACHING_LIFETIME_CURRENT
Inherited
| inherited_from |
\Smarty::CACHING_LIFETIME_CURRENT |
CACHING_LIFETIME_SAVED
CACHING_LIFETIME_SAVED
Inherited
| inherited_from |
\Smarty::CACHING_LIFETIME_SAVED |
define caching modes
CACHING_OFF
Inherited
| inherited_from |
\Smarty::CACHING_OFF |
COMPILECHECK_CACHEMISS
COMPILECHECK_CACHEMISS
Inherited
| inherited_from |
\Smarty::COMPILECHECK_CACHEMISS |
define compile check modes
COMPILECHECK_OFF
Inherited
| inherited_from |
\Smarty::COMPILECHECK_OFF |
COMPILECHECK_ON
COMPILECHECK_ON
Inherited
| inherited_from |
\Smarty::COMPILECHECK_ON |
FILTER_OUTPUT
FILTER_OUTPUT
Inherited
| inherited_from |
\Smarty::FILTER_OUTPUT |
filter types
FILTER_POST
Inherited
| inherited_from |
\Smarty::FILTER_POST |
FILTER_PRE
FILTER_PRE
Inherited
| inherited_from |
\Smarty::FILTER_PRE |
FILTER_VARIABLE
FILTER_VARIABLE
Inherited
| inherited_from |
\Smarty::FILTER_VARIABLE |
PHP_ALLOW
PHP_ALLOW
Inherited
| inherited_from |
\Smarty::PHP_ALLOW |
modes for handling of "<?php .
PHP_PASSTHRU
Inherited
.. ?>" tags in templates.
| inherited_from |
\Smarty::PHP_PASSTHRU |
PHP_QUOTE
PHP_QUOTE
Inherited
| inherited_from |
\Smarty::PHP_QUOTE |
PHP_REMOVE
PHP_REMOVE
Inherited
| inherited_from |
\Smarty::PHP_REMOVE |
PLUGIN_BLOCK
PLUGIN_BLOCK
Inherited
| inherited_from |
\Smarty::PLUGIN_BLOCK |
PLUGIN_COMPILER
PLUGIN_COMPILER
Inherited
| inherited_from |
\Smarty::PLUGIN_COMPILER |
plugin types
PLUGIN_FUNCTION
Inherited
| inherited_from |
\Smarty::PLUGIN_FUNCTION |
PLUGIN_MODIFIER
PLUGIN_MODIFIER
Inherited
| inherited_from |
\Smarty::PLUGIN_MODIFIER |
PLUGIN_MODIFIERCOMPILER
PLUGIN_MODIFIERCOMPILER
Inherited
| inherited_from |
\Smarty::PLUGIN_MODIFIERCOMPILER |
SCOPE_GLOBAL
SCOPE_GLOBAL
Inherited
| inherited_from |
\Smarty::SCOPE_GLOBAL |
define variable scopes
SCOPE_LOCAL
Inherited
| inherited_from |
\Smarty::SCOPE_LOCAL |
SCOPE_PARENT
SCOPE_PARENT
Inherited
| inherited_from |
\Smarty::SCOPE_PARENT |
SCOPE_ROOT
SCOPE_ROOT
Inherited
| inherited_from |
\Smarty::SCOPE_ROOT |
smarty version
SMARTY_VERSION
Inherited
| inherited_from |
\Smarty::SMARTY_VERSION |