$autoload_filters = array()
[line 338]
This indicates which filters are automatically loaded into Smarty.
Smarty Configuration Section
Tags:
$cache_dir = 'cache'
[line 167]
The name of the directory for cache files.
Smarty Configuration Section
$cache_handler_func = null
[line 331]
The function used for cache file handling. If not set, built-in caching is used.
Smarty Configuration Section
Tags:
$cache_lifetime = 3600
[line 178]
This is the number of seconds cached content will persist.
Smarty Configuration Section
- 0 = always regenerate cache
- -1 = never expires
$cache_modified_check = false
[line 188]
Only used when $caching is enabled. If true, then If-Modified-Since headers are respected with cached content, and appropriate HTTP headers are sent.
Smarty Configuration Section This way repeated hits to a cached page do not send the entire page to the client every time.
$caching = 0
[line 160]
This enables template caching.
Smarty Configuration Section
- 0 = no caching
- 1 = use class cache_lifetime value
- 2 = use cache_lifetime in cache file
$compiler_class = 'Smarty_Compiler'
[line 392]
The class used for compiling templates.
$compiler_file = 'Smarty_Compiler.class.php'
[line 385]
The file that contains the compiler class. This can a full pathname, or relative to the php_include path.
$compile_check = true
[line 141]
This tells Smarty whether to check for recompiling or not. Recompiling does not need to happen unless a template or config file is changed.
Smarty Configuration Section Typically you enable this during development, and disable for production.
$compile_dir = 'templates_c'
[line 82]
The directory where compiled templates are located.
Smarty Configuration Section
$compile_id = null
[line 291]
Set this if you want different sets of compiled files for the same templates. This is useful for things like different languages.
Smarty Configuration Section Instead of creating separate sets of templates per language, you set different compile_ids like 'en' and 'de'.
$config_booleanize = true
[line 354]
This tells whether or not to automatically booleanize config file variables.
If enabled, then the strings "on", "true", and "yes" are treated as boolean true, and "off", "false" and "no" are treated as boolean false.
$config_class = 'Config_File'
[line 399]
The class used to load config vars.
$config_dir = 'configs'
[line 89]
The directory where config files are located.
Smarty Configuration Section
$config_fix_newlines = true
[line 368]
This tells whether or not automatically fix newlines in config files.
It basically converts \r (mac) or \r\n (dos) to \n
$config_overwrite = true
[line 347]
This tells if config file vars of the same name overwrite each other or not.
if disabled, same name variables are accumulated in an array.
$config_read_hidden = false
[line 362]
This tells whether hidden sections [.foobar] are readable from the tempalates or not. Normally you would never allow this since that is the point behind hidden sections: the application can access them, but the templates cannot.
$debugging = false
[line 105]
If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows)
Smarty Configuration Section
$debugging_ctrl = 'NONE'
[line 131]
This determines if debugging is enable-able from the browser.
Smarty Configuration Section
- NONE => no debugging control allowed
- URL => enable debugging when SMARTY_DEBUG is found in the URL.
Tags:
$debug_tpl = ''
[line 120]
This is the path to the debug console template. If not set, the default one will be used.
Smarty Configuration Section
$default_modifiers = array()
[line 310]
This is a list of the modifiers to apply to all template variables.
Smarty Configuration Section Put each modifier in a separate array element in the order you want them applied. example:
array('escape:"htmlall"');
$default_resource_type = 'file'
[line 324]
This is the resource type to be used when not specified
Smarty Configuration Section at the beginning of the resource path. examples: $smarty->display('file:index.tpl'); $smarty->display('db:index.tpl'); $smarty->display('index.tpl'); // will use default resource type {include file="file:index.tpl"} {include file="db:index.tpl"} {include file="index.tpl"} {* will use default resource type *}
$default_template_handler_func = ''
[line 377]
If a template cannot be found, this PHP function will be executed.
Useful for creating templates on-the-fly or other special action.
Tags:
$error_reporting = null
[line 112]
When set, smarty does uses this value as error_reporting-level.
Smarty Configuration Section
$force_compile = false
[line 149]
This forces templates to compile every time. Useful for development or debugging.
Smarty Configuration Section
$left_delimiter = '{'
[line 255]
The left delimiter used for the template tags.
Smarty Configuration Section
$php_handling = SMARTY_PHP_PASSTHRU
[line 202]
This determines how Smarty handles "<?php ... ?>" tags in templates.
Smarty Configuration Section possible values:
- SMARTY_PHP_PASSTHRU -> print tags as plain text
- SMARTY_PHP_QUOTE -> escape tags as entities
- SMARTY_PHP_REMOVE -> remove php tags
- SMARTY_PHP_ALLOW -> execute php tags
$plugins_dir = array('plugins')
[line 96]
An array of directories searched for plugins.
Smarty Configuration Section
$request_use_auto_globals = true
[line 281]
Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
Smarty Configuration Section are uses as request-vars or $_*[]-vars. note: if request_use_auto_globals is true, then $request_vars_order has no effect, but the php-ini-value "gpc_order"
$request_vars_order = 'EGPCS'
[line 271]
The order in which request variables are registered, similar to variables_order in php.ini E = Environment, G = GET, P = POST, C = Cookies, S = Server
Smarty Configuration Section
$right_delimiter = '}'
[line 262]
The right delimiter used for the template tags.
Smarty Configuration Section
$secure_dir = array()
[line 221]
This is the list of template directories that are considered secure. This is used only if $security is enabled. One directory per array element. $template_dir is in this list implicitly.
Smarty Configuration Section
$security = false
[line 212]
This enables template security. When enabled, many things are restricted
Smarty Configuration Section in the templates that normally would go unchecked. This is useful when untrusted parties are editing templates and you want a reasonable level of security. (no direct execution of PHP in templates for example)
$security_settings = array(
'PHP_HANDLING' => false,
'IF_FUNCS' => array('array', 'list',
'isset', 'empty',
'count', 'sizeof',
'in_array', 'is_array',
'true', 'false', 'null'),'INCLUDE_ANY'=>false,'PHP_TAGS'=>false,'MODIFIER_FUNCS'=>array('count'),'ALLOW_CONSTANTS'=>false)
[line 229]
These are the security settings for Smarty. They are used only when $security is enabled.
Smarty Configuration Section
$template_dir = 'templates'
[line 75]
The name of the directory where templates are located.
Smarty Configuration Section
$trusted_dir = array()
[line 248]
This is an array of directories where trusted php scripts reside.
Smarty Configuration Section $security is disabled during their inclusion/execution.
$use_sub_dirs = false
[line 301]
This tells Smarty whether or not to use sub dirs in the cache/ and templates_c/ directories. sub directories better organized, but may not work well with PHP safe mode enabled.
Smarty Configuration Section
constructor Smarty [line 568]
method append [line 612]
void append(
array|string
$tpl_var, [mixed
$value = null], [
$merge = false])
|
|
appends values to template variables
Parameters:
method append_by_ref [line 652]
void append_by_ref(
string
$tpl_var,
&$value, [
$merge = false], mixed
$value)
|
|
appends values to template variables by reference
Parameters:
method assign [line 580]
void assign(
array|string
$tpl_var, [mixed
$value = null])
|
|
assigns values to template variables
Parameters:
method assign_by_ref [line 600]
void assign_by_ref(
string
$tpl_var,
&$value, mixed
$value)
|
|
assigns values to template variables by reference
Parameters:
method clear_all_assign [line 1006]
clear all the assigned template variables.
method clear_all_cache [line 970]
boolean clear_all_cache(
[string
$exp_time = null])
|
|
clear the entire contents of cache (all templates)
Tags:
Parameters:
method clear_assign [line 674]
void clear_assign(
string
$tpl_var)
|
|
clear the given assigned template variable.
Parameters:
method clear_cache [line 938]
boolean clear_cache(
[string
$tpl_file = null], [string
$cache_id = null], [string
$compile_id = null], [string
$exp_time = null])
|
|
clear cached content for the given template and cache id
Parameters:
method clear_compiled_tpl [line 1021]
boolean clear_compiled_tpl(
[string
$tpl_file = null], [string
$compile_id = null], [string
$exp_time = null])
|
|
clears compiled version of specified template resource, or all compiled template files if one is not specified.
This function is for advanced use only, not normally needed.
Tags:
Parameters:
method clear_config [line 1348]
void clear_config(
[string
$var = null])
|
|
clear configuration values
Parameters:
method config_load [line 1321]
void config_load(
string
$file, [string
$section = null], [string
$scope = 'global'])
|
|
load configuration values
Parameters:
method display [line 1106]
void display(
string
$resource_name, [string
$cache_id = null], [string
$compile_id = null])
|
|
executes & displays the template results
Parameters:
method fetch [line 1119]
void fetch(
string
$resource_name, [string
$cache_id = null], [string
$compile_id = null], [boolean
$display = false])
|
|
executes & returns or displays the template results
Parameters:
method get_config_vars [line 1074]
array &get_config_vars(
[string
$name = null], string
$type)
|
|
Returns an array containing config variables
Parameters:
method get_registered_object [line 1333]
object &get_registered_object(
string
$name)
|
|
return a reference to a registered object
Parameters:
method get_template_vars [line 1054]
array &get_template_vars(
[string
$name = null], string
$type)
|
|
Returns an array containing template variables
Parameters:
method is_cached [line 984]
string|false is_cached(
string
$tpl_file, [string
$cache_id = null], [string
$compile_id = null])
|
|
test to see if valid cache exists for this template
Tags:
Parameters:
method load_filter [line 912]
void load_filter(
string
$type, string
$name)
|
|
load a filter of specified type and name
Parameters:
method register_block [line 741]
void register_block(
string
$block, string
$block_impl, [
$cacheable = true], [
$cache_attrs = null])
|
|
Registers block function to be used in templates
Parameters:
method register_compiler_function [line 763]
void register_compiler_function(
string
$function, string
$function_impl, [
$cacheable = true])
|
|
Registers compiler function
Parameters:
method register_function [line 690]
void register_function(
string
$function, string
$function_impl, [
$cacheable = true], [
$cache_attrs = null])
|
|
Registers custom function to be used in templates
Parameters:
method register_modifier [line 785]
void register_modifier(
string
$modifier, string
$modifier_impl)
|
|
Registers modifier to be used in templates
Parameters:
method register_object [line 716]
void register_object(
string
$object, object
&$object_impl, [null|array
$allowed = array()], [boolean
$smarty_args = true], [
$block_methods = array()], null|array
$block_functs)
|
|
Registers object to be used in templates
Parameters:
method register_outputfilter [line 889]
void register_outputfilter(
string
$function)
|
|
Registers an output filter function to apply to a template output
Parameters:
method register_postfilter [line 866]
void register_postfilter(
string
$function)
|
|
Registers a postfilter function to apply to a compiled template after compilation
Parameters:
method register_prefilter [line 843]
void register_prefilter(
string
$function)
|
|
Registers a prefilter function to apply to a template before compiling
Parameters:
method register_resource [line 807]
void register_resource(
string
$type, array
$functions)
|
|
Registers a resource to fetch a template
Parameters:
method template_exists [line 1041]
boolean template_exists(
string
$tpl_file)
|
|
Checks whether requested template exists.
Parameters:
method trigger_error [line 1093]
void trigger_error(
string
$error_msg, [integer
$error_type = E_USER_WARNING])
|
|
trigger Smarty error
Parameters:
method unregister_block [line 752]
void unregister_block(
string
$block)
|
|
Unregisters block function
Parameters:
method unregister_compiler_function [line 774]
void unregister_compiler_function(
string
$function)
|
|
Unregisters compiler function
Parameters:
method unregister_function [line 702]
void unregister_function(
string
$function)
|
|
Unregisters custom function
Parameters:
method unregister_modifier [line 796]
void unregister_modifier(
string
$modifier)
|
|
Unregisters modifier
Parameters:
method unregister_object [line 729]
void unregister_object(
string
$object)
|
|
Unregisters object
Parameters:
method unregister_outputfilter [line 901]
void unregister_outputfilter(
string
$function)
|
|
Unregisters an outputfilter function
Parameters:
method unregister_postfilter [line 878]
void unregister_postfilter(
string
$function)
|
|
Unregisters a postfilter function
Parameters:
method unregister_prefilter [line 855]
void unregister_prefilter(
string
$function)
|
|
Unregisters a prefilter function
Parameters:
method unregister_resource [line 832]
void unregister_resource(
string
$type)
|
|
Unregisters a resource
Parameters:
method _compile_resource [line 1413]
boolean _compile_resource(
string
$resource_name, string
$compile_path)
|
|
compile the template
Parameters:
method _compile_source [line 1450]
boolean _compile_source(
string
$resource_name,
&$source_content,
&$compiled_content, [
$cache_include_path = null], string
$source_content, string
$compiled_content)
|
|
compile the given source
Parameters:
method _dequote [line 1699]
string _dequote(
string
$string)
|
|
Remove starting and ending quotes from the string
Parameters:
method _eval [line 1934]
mixed _eval(
$code, [
$params = null])
|
|
wrapper for eval() retaining $this
Parameters:
method _fetch_resource_info [line 1533]
boolean _fetch_resource_info(
&$params, string
$resource_name, string
$source_content, integer
$resource_timestamp, boolean
$get_source, boolean
$quiet)
|
|
fetch the template info. Gets timestamp, and source if get_source is true
sets $source_content to the source of the template, and $resource_timestamp to its time stamp
Parameters:
method _get_auto_filename [line 1739]
string _get_auto_filename(
string
$auto_base, [string
$auto_source = null], [string
$auto_id = null])
|
|
get a concrete filename for automagically created content
Tags:
Parameters:
method _get_auto_id [line 1789]
string|null _get_auto_id(
[string
$cache_id = null], [string
$compile_id = null])
|
|
returns an auto_id for auto-file-functions
Parameters:
method _get_compile_path [line 1513]
string _get_compile_path(
string
$resource_name)
|
|
Get the compile path for this resource
Tags:
Parameters:
method _get_plugin_filepath [line 1366]
string|false _get_plugin_filepath(
string
$type, string
$name)
|
|
get filepath of requested plugin
Parameters:
method _include [line 1920]
mixed _include(
$filename, [
$once = false], [
$params = null])
|
|
wrapper for include() retaining $this
Parameters:
method _is_compiled [line 1380]
boolean _is_compiled(
string
$resource_name, string
$compile_path)
|
|
test if resource needs compiling
Parameters:
method _parse_resource_name [line 1617]
boolean _parse_resource_name(
&$params, string
$resource_base_path, string
$resource_name, string
$resource_type)
|
|
parse out the type and name from the resource
Parameters:
method _process_compiled_include_callback [line 1828]
string _process_compiled_include_callback(
$match)
|
|
callback function for preg_replace, to call a non-cacheable block
Parameters:
method _read_file [line 1715]
string _read_file(
string
$filename)
|
|
read in a file
Parameters:
method _run_mod_handler [line 1678]
string _run_mod_handler(
string|null
$modifier_name, array|null
$map_array)
|
|
Handle modifiers
Tags:
Parameters:
method _smarty_cache_attrs [line 1897]
array &_smarty_cache_attrs(
$cache_serial,
$count)
|
|
get or set an array of cached attributes for function that is
not cacheable
Parameters:
method _smarty_include [line 1847]
void _smarty_include(
$params, string
$_smarty_include_tpl_file, string
$_smarty_include_vars)
|
|
called for included templates
Parameters:
method _trigger_fatal_error [line 1808]
void _trigger_fatal_error(
string
$error_msg, [string
$tpl_file = null], [integer
$tpl_line = null], [string
$file = null], [integer
$line = null], [integer
$error_type = E_USER_ERROR])
|
|
trigger Smarty plugin error
Parameters:
method _unlink [line 1771]
void _unlink(
string
$resource, [integer
$exp_time = null])
|
|
unlink a file, possibly using expiration time
Parameters: