__construct | ( | ) |
The class constructor.
Переопределяется в ArchiveModule_Admin, CatalogModule_Admin, FaqModule_Admin, FeedbackModule_Admin, GalleryModule_Admin, GuestbookModule_Admin, PagesModule_Admin, SearchModule_Admin, ShopLiteModule_Admin, SiteMapModule_Admin, SiteMapModule, UsersModule_Admin, VotingModule_Admin и A_Navigation.
_compile_resource | ( | $ | resource_name, | |
$ | compile_path | |||
) | [protected] |
compile the template
string | $resource_name | |
string | $compile_path |
_compile_source | ( | $ | resource_name, | |
&$ | source_content, | |||
&$ | compiled_content, | |||
$ | cache_include_path = null | |||
) | [protected] |
compile the given source
string | $resource_name | |
string | $source_content | |
string | $compiled_content |
_dequote | ( | $ | string | ) | [protected] |
Remove starting and ending quotes from the string.
string | $string |
_eval | ( | $ | code, | |
$ | params = null | |||
) | [protected] |
wrapper for eval() retaining $this
_fetch_resource_info | ( | &$ | params | ) | [protected] |
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
string | $resource_name | |
string | $source_content | |
integer | $resource_timestamp | |
boolean | $get_source | |
boolean | $quiet |
_get_auto_filename | ( | $ | auto_base, | |
$ | auto_source = null , |
|||
$ | auto_id = null | |||
) | [protected] |
get a concrete filename for automagically created content
string | $auto_base | |
string | $auto_source | |
string | $auto_id |
_get_auto_id | ( | $ | cache_id = null , |
|
$ | compile_id = null | |||
) | [protected] |
returns an auto_id for auto-file-functions
string | $cache_id | |
string | $compile_id |
_get_compile_path | ( | $ | resource_name | ) | [protected] |
Get the compile path for this resource.
string | $resource_name |
_get_filter_name | ( | $ | function | ) | [protected] |
Extracts the filter name from the given callback.
callback | $function |
_get_plugin_filepath | ( | $ | type, | |
$ | name | |||
) |
get filepath of requested plugin
string | $type | |
string | $name |
_include | ( | $ | filename, | |
$ | once = false , |
|||
$ | params = null | |||
) | [protected] |
wrapper for include() retaining $this
_is_compiled | ( | $ | resource_name, | |
$ | compile_path | |||
) | [protected] |
test if resource needs compiling
string | $resource_name | |
string | $compile_path |
_parse_resource_name | ( | &$ | params | ) | [protected] |
parse out the type and name from the resource
string | $resource_base_path | |
string | $resource_name | |
string | $resource_type | |
string | $resource_name |
_process_compiled_include_callback | ( | $ | match | ) | [protected] |
callback function for preg_replace, to call a non-cacheable block
_read_file | ( | $ | filename | ) | [protected] |
read in a file
string | $filename |
_run_mod_handler | ( | ) | [protected] |
Handle modifiers.
string|null | $modifier_name | |
array|null | $map_array |
& _smarty_cache_attrs | ( | $ | cache_serial, | |
$ | count | |||
) | [protected] |
get or set an array of cached attributes for function that is not cacheable
_smarty_include | ( | $ | params | ) | [protected] |
called for included templates
string | $_smarty_include_tpl_file | |
string | $_smarty_include_vars |
_trigger_fatal_error | ( | $ | error_msg, | |
$ | tpl_file = null , |
|||
$ | tpl_line = null , |
|||
$ | file = null , |
|||
$ | line = null , |
|||
$ | error_type = E_USER_ERROR | |||
) | [protected] |
trigger Smarty plugin error
string | $error_msg | |
string | $tpl_file | |
integer | $tpl_line | |
string | $file | |
integer | $line | |
integer | $error_type |
_unlink | ( | $ | resource, | |
$ | exp_time = null | |||
) | [protected] |
unlink a file, possibly using expiration time
string | $resource | |
integer | $exp_time |
append | ( | $ | tpl_var, | |
$ | value = null , |
|||
$ | merge = false | |||
) |
appends values to template variables
array|string | $tpl_var the template variable name(s) | |
mixed | $value the value to append |
append_by_ref | ( | $ | tpl_var, | |
&$ | value, | |||
$ | merge = false | |||
) |
appends values to template variables by reference
string | $tpl_var the template variable name | |
mixed | $value the referenced value to append |
assign | ( | $ | tpl_var, | |
$ | value = null | |||
) |
assigns values to template variables
array|string | $tpl_var the template variable name(s) | |
mixed | $value the value to assign |
assign_by_ref | ( | $ | tpl_var, | |
&$ | value | |||
) |
assigns values to template variables by reference
string | $tpl_var the template variable name | |
mixed | $value the referenced value to assign |
clear_all_assign | ( | ) |
clear all the assigned template variables.
clear_all_cache | ( | $ | exp_time = null |
) |
clear the entire contents of cache (all templates)
string | $exp_time expire time |
clear_assign | ( | $ | tpl_var | ) |
clear the given assigned template variable.
string | $tpl_var the template variable to clear |
clear_cache | ( | $ | tpl_file = null , |
|
$ | cache_id = null , |
|||
$ | compile_id = null , |
|||
$ | exp_time = null | |||
) |
clear cached content for the given template and cache id
string | $tpl_file name of template file | |
string | $cache_id name of cache_id | |
string | $compile_id name of compile_id | |
string | $exp_time expiration time |
clear_compiled_tpl | ( | $ | tpl_file = null , |
|
$ | compile_id = null , |
|||
$ | 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.
string | $tpl_file | |
string | $compile_id | |
string | $exp_time |
clear_config | ( | $ | var = null |
) |
clear configuration values
string | $var |
config_load | ( | $ | file, | |
$ | section = null , |
|||
$ | scope = 'global' | |||
) |
load configuration values
string | $file | |
string | $section | |
string | $scope |
display | ( | $ | resource_name, | |
$ | cache_id = null , |
|||
$ | compile_id = null | |||
) |
executes & displays the template results
string | $resource_name | |
string | $cache_id | |
string | $compile_id |
fetch | ( | $ | resource_name, | |
$ | cache_id = null , |
|||
$ | compile_id = null , |
|||
$ | display = false | |||
) |
executes & returns or displays the template results
string | $resource_name | |
string | $cache_id | |
string | $compile_id | |
boolean | $display |
& get_config_vars | ( | $ | name = null |
) |
Returns an array containing config variables.
string | $name | |
string | $type |
& get_registered_object | ( | $ | name | ) |
return a reference to a registered object
string | $name |
& get_template_vars | ( | $ | name = null |
) |
Returns an array containing template variables.
string | $name | |
string | $type |
is_cached | ( | $ | tpl_file, | |
$ | cache_id = null , |
|||
$ | compile_id = null | |||
) |
test to see if valid cache exists for this template
string | $tpl_file name of template file | |
string | $cache_id | |
string | $compile_id |
load_filter | ( | $ | type, | |
$ | name | |||
) |
load a filter of specified type and name
string | $type filter type | |
string | $name filter name |
register_block | ( | $ | block, | |
$ | block_impl, | |||
$ | cacheable = true , |
|||
$ | cache_attrs = null | |||
) |
Registers block function to be used in templates.
string | $block name of template block | |
string | $block_impl PHP function to register |
register_compiler_function | ( | $ | function, | |
$ | function_impl, | |||
$ | cacheable = true | |||
) |
Registers compiler function.
string | $function name of template function | |
string | $function_impl name of PHP function to register |
register_function | ( | $ | function, | |
$ | function_impl, | |||
$ | cacheable = true , |
|||
$ | cache_attrs = null | |||
) |
Registers custom function to be used in templates.
string | $function the name of the template function | |
string | $function_impl the name of the PHP function to register |
register_modifier | ( | $ | modifier, | |
$ | modifier_impl | |||
) |
Registers modifier to be used in templates.
string | $modifier name of template modifier | |
string | $modifier_impl name of PHP function to register |
register_object | ( | $ | object, | |
&$ | object_impl, | |||
$ | allowed = array() , |
|||
$ | smarty_args = true , |
|||
$ | block_methods = array() | |||
) |
Registers object to be used in templates.
string | $object name of template object | |
object | &$object_impl the referenced PHP object to register | |
null|array | $allowed list of allowed methods (empty = all) | |
boolean | $smarty_args smarty argument format, else traditional | |
null|array | $block_functs list of methods that are block format |
register_outputfilter | ( | $ | function | ) |
Registers an output filter function to apply to a template output.
callback | $function |
register_postfilter | ( | $ | function | ) |
Registers a postfilter function to apply to a compiled template after compilation.
callback | $function |
register_prefilter | ( | $ | function | ) |
Registers a prefilter function to apply to a template before compiling.
callback | $function |
register_resource | ( | $ | type, | |
$ | functions | |||
) |
Registers a resource to fetch a template.
string | $type name of resource | |
array | $functions array of functions to handle resource |
template_exists | ( | $ | tpl_file | ) |
Checks whether requested template exists.
string | $tpl_file |
trigger_error | ( | $ | error_msg, | |
$ | error_type = E_USER_WARNING | |||
) |
unregister_block | ( | $ | block | ) |
Unregisters block function.
string | $block name of template function |
unregister_compiler_function | ( | $ | function | ) |
Unregisters compiler function.
string | $function name of template function |
unregister_function | ( | $ | function | ) |
Unregisters custom function.
string | $function name of template function |
unregister_modifier | ( | $ | modifier | ) |
Unregisters modifier.
string | $modifier name of template modifier |
unregister_object | ( | $ | object | ) |
Unregisters object.
string | $object name of template object |
unregister_outputfilter | ( | $ | function | ) |
Unregisters an outputfilter function.
callback | $function |
unregister_postfilter | ( | $ | function | ) |
Unregisters a postfilter function.
callback | $function |
unregister_prefilter | ( | $ | function | ) |
Unregisters a prefilter function.
callback | $function |
unregister_resource | ( | $ | type | ) |
Unregisters a resource.
string | $type name of resource |
$_cache_include |
name of optional cache include file
$_cache_including |
indicate if the current code is used in a compiled include
$_cache_info |
info that makes up a cache file
$_cache_serials |
cache serials
$_compile_id |
for different compiled templates
$_conf_obj |
configuration object
$_config |
loaded configuration settings
$_dir_perms |
default dir permissions
$_file_perms |
default file permissions
$_foreach |
keeps track of foreach blocks
$_inclusion_depth |
current template inclusion depth
$_plugins |
table keeping track of plugins
$_reg_objects |
registered objects
$_sections |
keeps track of sections
$_smarty_debug_id |
text in URL to enable debug mode
$_smarty_debug_info |
debugging information for debug console
$_smarty_md5 |
md5 checksum of the string 'Smarty'
$_smarty_vars |
stores run-time $smarty.
* vars
$_tag_stack |
keeps track of tag hierarchy
$_tpl_vars |
where assigned template vars are kept
$_version |
Smarty version number.
$autoload_filters |
This indicates which filters are automatically loaded into Smarty.
array of filter names
$cache_dir |
The name of the directory for cache files.
$cache_handler_func |
The function used for cache file handling.
If not set, built-in caching is used.
$cache_lifetime |
This is the number of seconds cached content will persist.
$cache_modified_check |
Only used when $caching is enabled.
If true, then If-Modified-Since headers are respected with cached content, and appropriate HTTP headers are sent. This way repeated hits to a cached page do not send the entire page to the client every time.
$caching |
This enables template caching.
$compile_check |
This tells Smarty whether to check for recompiling or not.
Recompiling does not need to happen unless a template or config file is changed. Typically you enable this during development, and disable for production.
$compile_dir |
The directory where compiled templates are located.
$compile_id |
Set this if you want different sets of compiled files for the same templates.
This is useful for things like different languages. Instead of creating separate sets of templates per language, you set different compile_ids like 'en' and 'de'.
$compiler_class |
The class used for compiling templates.
$compiler_file |
The file that contains the compiler class.
This can a full pathname, or relative to the php_include path.
$config_booleanize |
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 |
The class used to load config vars.
$config_dir |
The directory where config files are located.
$config_fix_newlines |
This tells whether or not automatically fix newlines in config files.
It basically converts (mac) or
(dos) to
$config_overwrite |
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 |
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.
$debug_tpl |
This is the path to the debug console template.
If not set, the default one will be used.
$debugging |
If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows).
$debugging_ctrl |
This determines if debugging is enable-able from the browser.
$default_modifiers |
This is a list of the modifiers to apply to all template variables.
Put each modifier in a separate array element in the order you want them applied. example: array('escape:"htmlall"');
$default_resource_type |
This is the resource type to be used when not specified 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 |
If a template cannot be found, this PHP function will be executed.
Useful for creating templates on-the-fly or other special action. function name
$error_reporting |
When set, smarty does uses this value as error_reporting-level.
$force_compile |
This forces templates to compile every time.
Useful for development or debugging.
$left_delimiter |
The left delimiter used for the template tags.
$php_handling |
This determines how Smarty handles "<?php ... ?>" tags in templates.
possible values:
$plugins_dir |
An array of directories searched for plugins.
$request_use_auto_globals |
Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false) 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 |
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.
$right_delimiter |
The right delimiter used for the template tags.
$secure_dir |
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.
$security |
This enables template security.
When enabled, many things are restricted 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 |
$template_dir |
The name of the directory where templates are located.
$trusted_dir |
This is an array of directories where trusted php scripts reside.
$security is disabled during their inclusion/execution.
$use_sub_dirs |
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.