Class Smarty
This is the main Smarty class
Copyright: 2008 New Digital Group, Inc.
Author: Monte Ohrt
Author: Uwe Tews
Author: Rodney Rehm
Located at plugins/smarty/smarty_source/Smarty.class.php
public
|
|
public
|
|
public
|
|
public
mixed
|
|
public
|
|
public
boolean
|
|
public
string
|
|
public
integer
|
|
public
integer
|
#
clearCache( string $template_name, string $cache_id = null, string $compile_id = null, integer $exp_time = null, string $type = null )
Empty cache for a specific template |
public
|
#
enableSecurity( string|
Loads security class and enables security |
public
|
|
public
|
|
public
|
|
public
array|string
|
|
public
|
|
public
|
|
public
array|string
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
public
|
|
public
array
|
|
public
string
|
|
public
|
|
public
object
|
#
createTemplate( string $template, mixed $cache_id = null, mixed $compile_id = null, object $parent = null, boolean $do_clone = true )
creates a template object |
public
string
|
#
loadPlugin( string $plugin_name, boolean $check = true )
Takes unknown classes and loads plugin files for them class name format: Smarty_PluginType_PluginName plugin filename format: plugintype.pluginname.php |
public
integer
|
#
compileAllTemplates( string $extension = '.tpl', boolean $force_compile = false, integer $time_limit = 0, integer $max_errors = null )
Compile all template files |
public
integer
|
#
compileAllConfig( string $extension = '.conf', boolean $force_compile = false, integer $time_limit = 0, integer $max_errors = null )
Compile all config files |
public
integer
|
#
clearCompiledTemplate( string $resource_name = null, string $compile_id = null, integer $exp_time = null )
Delete compiled template file |
public
array
|
#
getTags(
Return array of tag/attributes of all tags used by an template |
public
boolean
|
|
public static
boolean
|
#
mutingErrorHandler( integer $errno, $errstr, $errfile, $errline, $errcontext )
Error Handler to mute expected messages |
public static
|
|
public static
|
string |
SMARTY_VERSION
smarty version |
#
'Smarty-3.1.21-dev'
|
integer |
SCOPE_LOCAL
define variable scopes |
#
0
|
integer |
SCOPE_PARENT
|
#
1
|
integer |
SCOPE_ROOT
|
#
2
|
integer |
SCOPE_GLOBAL
|
#
3
|
integer |
CACHING_OFF
define caching modes |
#
0
|
integer |
CACHING_LIFETIME_CURRENT
|
#
1
|
integer |
CACHING_LIFETIME_SAVED
|
#
2
|
integer |
CLEAR_EXPIRED
define constant for clearing cache files be saved expiration datees |
#
-1
|
integer |
COMPILECHECK_OFF
define compile check modes |
#
0
|
integer |
COMPILECHECK_ON
|
#
1
|
integer |
COMPILECHECK_CACHEMISS
|
#
2
|
integer |
PHP_PASSTHRU
modes for handling of "" tags in templates. |
#
0
|
integer |
PHP_QUOTE
|
#
1
|
integer |
PHP_REMOVE
|
#
2
|
integer |
PHP_ALLOW
|
#
3
|
string |
FILTER_POST
filter types |
#
'post'
|
string |
FILTER_PRE
|
#
'pre'
|
string |
FILTER_OUTPUT
|
#
'output'
|
string |
FILTER_VARIABLE
|
#
'variable'
|
string |
PLUGIN_FUNCTION
plugin types |
#
'function'
|
string |
PLUGIN_BLOCK
|
#
'block'
|
string |
PLUGIN_COMPILER
|
#
'compiler'
|
string |
PLUGIN_MODIFIER
|
#
'modifier'
|
string |
PLUGIN_MODIFIERCOMPILER
|
#
'modifiercompiler'
|
public static
array
|
$global_tpl_vars
assigned global tpl vars |
#
array()
|
public static
|
$_previous_error_handler
error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors() |
#
null
|
public static
array
|
$_muted_directories
contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors() |
#
array()
|
public static
|
$_MBSTRING
Flag denoting if Multibyte String functions are available |
#
SMARTY_MBSTRING
|
public static
|
$_CHARSET
The character set to adhere to (e.g. "UTF-8") |
#
SMARTY_RESOURCE_CHAR_SET
|
public static
|
$_DATE_FORMAT
The date format to be used internally (accepts date() and strftime()) |
#
SMARTY_RESOURCE_DATE_FORMAT
|
public static
string
|
$_UTF8_MODIFIER
Flag denoting if PCRE should run in UTF-8 mode |
#
'u'
|
public static
boolean
|
$_IS_WINDOWS
Flag denoting if operating system is windows |
#
false
|
public
boolean
|
$auto_literal
auto literal on delimiters with whitspace |
#
true
|
public
boolean
|
$error_unassigned
display error on not assigned variables |
#
false
|
public
boolean
|
$use_include_path
look up relative filepaths in include_path |
#
false
|
private
array
|
$template_dir
template directory |
#
array()
|
public
string
|
$joined_template_dir
joined template directory string used in cache keys |
#
null
|
public
string
|
$joined_config_dir
joined config directory string used in cache keys |
#
null
|
public
callable
|
$default_template_handler_func
default template handler |
#
null
|
public
callable
|
$default_config_handler_func
default config handler |
#
null
|
public
callable
|
$default_plugin_handler_func
default plugin handler |
#
null
|
private
string
|
$compile_dir
compile directory |
#
null
|
private
array
|
$plugins_dir
plugins directory |
#
array()
|
private
string
|
$cache_dir
cache directory |
#
null
|
private
array
|
$config_dir
config directory |
#
array()
|
public
boolean
|
$force_compile
force template compiling? |
#
false
|
public
boolean
|
$compile_check
check template for modifications? |
#
true
|
public
boolean
|
$use_sub_dirs
use sub dirs for compiled/cached files? |
#
false
|
public
boolean
|
$allow_ambiguous_resources
allow ambiguous resources (that are made unique by the resource handler) |
#
false
|
public
boolean
|
$caching
caching enabled |
#
false
|
public
boolean
|
$merge_compiled_includes
merge compiled includes |
#
false
|
public
boolean
|
$inheritance_merge_compiled_includes
template inheritance merge compiled includes |
#
true
|
public
integer
|
$cache_lifetime
cache lifetime in seconds |
#
3600
|
public
boolean
|
$force_cache
force cache file creation |
#
false
|
public
string
|
$cache_id
Set this if you want different sets of cache files for the same templates. |
#
null
|
public
string
|
$compile_id
Set this if you want different sets of compiled files for the same templates. |
#
null
|
public
string
|
$left_delimiter
template left-delimiter |
#
"{"
|
public
string
|
$right_delimiter
template right-delimiter |
#
"}"
|
public
string
|
$security_class
class name This should be instance of Smarty_Security. |
#
'Smarty_Security'
|
public
|
$security_policy
implementation of security class |
#
null
|
public
integer
|
$php_handling
controls handling of PHP-blocks |
|
public
boolean
|
$allow_php_templates
controls if the php template file resource is allowed |
#
false
|
public
boolean
|
$direct_access_security
Should compiled-templates be prevented from being called directly? } |
#
true
|
public
boolean
|
$debugging
debug mode Setting this to true enables the debug-console. |
#
false
|
public
string
|
$debugging_ctrl
This determines if debugging is enable-able from the browser.
|
#
'NONE'
|
public
type
|
$smarty_debug_id
Name of debugging URL-param. Only used when $debugging_ctrl is set to 'URL'. The name of the URL-parameter that activates debugging. |
#
'SMARTY_DEBUG'
|
public
string
|
$debug_tpl
Path of debug template. |
#
null
|
public
integer
|
$error_reporting
When set, smarty uses this value as error_reporting-level. |
#
null
|
public
boolean
|
$get_used_tags
Internal flag for getTags() |
#
false
|
public
boolean
|
$config_overwrite
Controls whether variables with the same name overwrite each other. |
#
true
|
public
boolean
|
$config_booleanize
Controls whether config values of on/true/yes and off/false/no get converted to boolean. |
#
true
|
public
boolean
|
$compile_locking
locking concurrent compiles |
#
true
|
public
boolean
|
$cache_locking
Controls whether cache resources should emply locking mechanism |
#
false
|
public
float
|
$locking_timeout
seconds to wait for acquiring a lock before ignoring the write lock |
#
10
|
public
array
|
$template_functions
global template functions |
#
array()
|
public
string
|
$default_resource_type
resource type used if none given Must be an valid key of $registered_resources. |
#
'file'
|
public
string
|
$caching_type
caching type Must be an element of $cache_resource_types. |
#
'file'
|
public
array
|
$properties
internal config properties |
#
array()
|
public
string
|
$default_config_type
config type |
#
'file'
|
public
array
|
$template_objects
cached template objects |
#
array()
|
public
boolean
|
$cache_modified_check
check If-Modified-Since headers |
#
false
|
public
array
|
$registered_plugins
registered plugins |
#
array()
|
public
array
|
$plugin_search_order
plugin search order |
#
array('function', 'block', 'compiler', 'class')
|
public
array
|
$registered_objects
registered objects |
#
array()
|
public
array
|
$registered_classes
registered classes |
#
array()
|
public
array
|
$registered_filters
registered filters |
#
array()
|
public
array
|
$registered_resources
registered resources |
#
array()
|
public
array
|
$_resource_handlers
resource handler cache |
#
array()
|
public
array
|
$registered_cache_resources
registered cache resources |
#
array()
|
public
array
|
$_cacheresource_handlers
cache resource handler cache |
#
array()
|
public
array
|
$autoload_filters
autoload filter |
#
array()
|
public
array
|
$default_modifiers
default modifier |
#
array()
|
public
boolean
|
$escape_html
autoescape variable output |
#
false
|
public static
array
|
$_smarty_vars
global internal smarty vars |
#
array()
|
public
integer
|
$start_time
start time for execution time calculation |
#
0
|
public
integer
|
$_file_perms
default file permissions |
#
0644
|
public
integer
|
$_dir_perms
default dir permissions |
#
0771
|
public
array
|
$_tag_stack
block tag hierarchy |
#
array()
|
public
|
$smarty
self pointer to Smarty object |
|
public
string
|
$_current_file
required by the compiler for BC |
#
null
|
public
boolean
|
$_parserdebug
internal flag to enable parser debugging |
#
false
|
public
array
|
$merged_templates_func
Saved parameter of merged templates during compilation |
#
array()
|
public static
array
|
$_is_file_cache
Cache of is_file results of loadPlugin() |
#
array()
|
$config_vars,
$parent,
$template_class,
$tpl_vars
|