Chapter 13. Smarty Class Methods()

Table of Contents

append() — append an element to an assigned array
appendByRef() — append values by reference
assign() — assign variables/objects to the templates
assignByRef() — assign values by reference
clearAllAssign() — clears the values of all assigned variables
clearAllCache() — clears the entire template cache
clearAssign() — clears the value of an assigned variable
clearCache() — clears the cache for a specific template
clearCompiledTemplate() — clears the compiled version of the specified template resource
clearConfig() — clears assigned config variables
compileAllConfig() — compiles all known config files
compileAllTemplates() — compiles all known templates
configLoad() — loads config file data and assigns it to the template
createData() — creates a data object
createTemplate() — returns a template object
disableSecurity() — disables template security
display() — displays the template
enableSecurity() — enables template security
fetch() — returns the template output
getConfigVars() — returns the given loaded config variable value
getRegisteredObject() — returns a reference to a registered object
getTags() — return tags used by template
getTemplateVars() — returns assigned variable value(s)
isCached() — returns true if there is a valid cache for this template
loadFilter() — load a filter plugin
registerFilter() — dynamically register filters
registerPlugin() — dynamically register plugins
registerObject() — register an object for use in the templates
registerResource() — dynamically register resources
templateExists() — checks whether the specified template exists
unregisterFilter() — dynamically unregister a filter
unregisterPlugin — dynamically unregister plugins
unregisterObject() — dynamically unregister an object
unregisterResource() — dynamically unregister a resource plugin
testInstall() — checks Smarty installation

Note

See Changing settings by template section for how to use the functions for individual templates.