| 148 |
lars |
1 |
Smarty Class Methods {#api.functions}
|
|
|
2 |
====================
|
|
|
3 |
|
|
|
4 |
## Table of contents
|
|
|
5 |
|
|
|
6 |
- [addConfigDir()](./api-functions/api-add-config-dir.md) — add a directory to the list of directories where config files are stored
|
|
|
7 |
- [addPluginsDir()](./api-functions/api-add-plugins-dir.md) — add a directory to the list of directories where plugins are stored
|
|
|
8 |
- [addTemplateDir()](./api-functions/api-add-template-dir.md) — add a directory to the list of directories where templates are stored
|
|
|
9 |
- [append()](./api-functions/api-append.md) — append an element to an assigned array
|
|
|
10 |
- [appendByRef()](./api-functions/api-append-by-ref.md) — append values by reference
|
|
|
11 |
- [assign()](./api-functions/api-assign.md) — assign variables/objects to the templates
|
|
|
12 |
- [assignByRef()](./api-functions/api-assign-by-ref.md) — assign values by reference
|
|
|
13 |
- [clearAllAssign()](./api-functions/api-clear-all-assign.md) — clears the values of all assigned variables
|
|
|
14 |
- [clearAllCache()](./api-functions/api-clear-all-cache.md) — clears the entire template cache
|
|
|
15 |
- [clearAssign()](./api-functions/api-clear-assign.md) — clears the value of an assigned variable
|
|
|
16 |
- [clearCache()](./api-functions/api-clear-cache.md) — clears the cache for a specific template
|
|
|
17 |
- [clearCompiledTemplate()](./api-functions/api-clear-compiled-tpl.md) — clears the compiled version of the specified template resource
|
|
|
18 |
- [clearConfig()](./api-functions/api-clear-config.md) — clears assigned config variables
|
|
|
19 |
- [compileAllConfig()](./api-functions/api-compile-all-config.md) — compiles all known config files
|
|
|
20 |
- [compileAllTemplates()](./api-functions/api-compile-all-templates.md) — compiles all known templates
|
|
|
21 |
- [configLoad()](./api-functions/api-config-load.md) — loads config file data and assigns it to the template
|
|
|
22 |
- [createData()](./api-functions/api-create-data.md) — creates a data object
|
|
|
23 |
- [createTemplate()](./api-functions/api-create-template.md) — returns a template object
|
|
|
24 |
- [disableSecurity()](./api-functions/api-disable-security.md) — disables template security
|
|
|
25 |
- [display()](./api-functions/api-display.md) — displays the template
|
|
|
26 |
- [enableSecurity()](./api-functions/api-enable-security.md) — enables template security
|
|
|
27 |
- [fetch()](./api-functions/api-fetch.md) — returns the template output
|
|
|
28 |
- [getCacheDir()](./api-functions/api-get-cache-dir.md) — return the directory where the rendered template's output is stored
|
|
|
29 |
- [getCompileDir()](./api-functions/api-get-compile-dir.md) — returns the directory where compiled templates are stored
|
|
|
30 |
- [getConfigDir()](./api-functions/api-get-config-dir.md) — return the directory where config files are stored
|
|
|
31 |
- [getConfigVars()](./api-functions/api-get-config-vars.md) — returns the given loaded config variable value
|
|
|
32 |
- [getPluginsDir()](./api-functions/api-get-plugins-dir.md) — return the directory where plugins are stored
|
|
|
33 |
- [getRegisteredObject()](./api-functions/api-get-registered-object.md) — returns a reference to a registered object
|
|
|
34 |
- [getTags()](./api-functions/api-get-tags.md) — return tags used by template
|
|
|
35 |
- [getTemplateDir()](./api-functions/api-get-template-dir.md) — return the directory where templates are stored
|
|
|
36 |
- [getTemplateVars()](./api-functions/api-get-template-vars.md) — returns assigned variable value(s)
|
|
|
37 |
- [isCached()](./api-functions/api-is-cached.md) — returns true if there is a valid cache for this template
|
|
|
38 |
- [loadFilter()](./api-functions/api-load-filter.md) — load a filter plugin
|
|
|
39 |
- [muteExpectedErrors()](./api-functions/api-mute-expected-errors.md) — mutes expected warnings and notices deliberately generated by Smarty
|
|
|
40 |
- [registerCacheResource()](./api-functions/api-register-cacheresource.md) — dynamically register CacheResources
|
|
|
41 |
- [registerClass()](./api-functions/api-register-class.md) — register a class for use in the templates
|
|
|
42 |
- [registerDefaultPluginHandler()](./api-functions/api-register-default-plugin-handler.md) — register a function which gets called on undefined tags
|
|
|
43 |
- [registerFilter()](./api-functions/api-register-filter.md) — dynamically register filters
|
|
|
44 |
- [registerPlugin()](./api-functions/api-register-plugin.md) — dynamically register plugins
|
|
|
45 |
- [registerObject()](./api-functions/api-register-object.md) — register an object for use in the templates
|
|
|
46 |
- [registerResource()](./api-functions/api-register-resource.md) — dynamically register resources
|
|
|
47 |
- [setCacheDir()](./api-functions/api-set-cache-dir.md) — set the directory where the rendered template's output is stored
|
|
|
48 |
- [setCompileDir()](./api-functions/api-set-compile-dir.md) — set the directory where compiled templates are stored
|
|
|
49 |
- [setConfigDir()](./api-functions/api-set-config-dir.md) — set the directories where config files are stored
|
|
|
50 |
- [setPluginsDir()](./api-functions/api-set-plugins-dir.md) — set the directories where plugins are stored
|
|
|
51 |
- [setTemplateDir()](./api-functions/api-set-template-dir.md) — set the directories where templates are stored
|
|
|
52 |
- [templateExists()](./api-functions/api-template-exists.md) — checks whether the specified template exists
|
|
|
53 |
- [unregisterCacheResource()](./api-functions/api-unregister-cacheresource.md) — dynamically unregister a CacheResource plugin
|
|
|
54 |
- [unregisterFilter()](./api-functions/api-unregister-filter.md) — dynamically unregister a filter
|
|
|
55 |
- [unregisterPlugin()](./api-functions/api-unregister-plugin.md) — dynamically unregister plugins
|
|
|
56 |
- [unregisterObject()](./api-functions/api-unregister-object.md) — dynamically unregister an object
|
|
|
57 |
- [unregisterResource()](./api-functions/api-unregister-resource.md) — dynamically unregister a resource plugin
|
|
|
58 |
- [testInstall()](./api-functions/api-test-install.md) — checks Smarty installation
|
|
|
59 |
|
|
|
60 |
> **Note**
|
|
|
61 |
>
|
|
|
62 |
> See
|
|
|
63 |
> [`Changing settings by template`](./advanced-features/advanced-features-template-settings.md)
|
|
|
64 |
> section for how to use the functions for individual templates.
|