-
Notifications
You must be signed in to change notification settings - Fork 0
class ZorgSmarty_Compiler
www/includes/smarty.inc.php
zorg\Smarty
- IneX
- 03.01.2016
1.0
_cache_include() | _cache_including() | _cache_info() | _cache_serials() | _compile_id() | _conf_obj() | _config() | _dir_perms() | _file_perms() | _foreach() | _inclusion_depth() | _plugins() | _reg_objects() | _sections() | _smarty_debug_id() | _smarty_debug_info() | _smarty_md5() | _smarty_vars() | _tag_stack() | _tpl_vars() | _version() | autoload_filters() | cache_dir() | cache_handler_func() | cache_lifetime() | cache_modified_check() | caching() | compile_check() | compile_dir() | compile_id() | compiler_class() | compiler_file() | config_booleanize() | config_class() | config_dir() | config_fix_newlines() | config_overwrite() | config_read_hidden() | debug_tpl() | debugging() | debugging_ctrl() | default_modifiers() | default_resource_type() | default_template_handler_func() | error_reporting() | force_compile() | left_delimiter() | php_handling() | plugins_dir() | request_use_auto_globals() | request_vars_order() | right_delimiter() | secure_dir() | security() | security_settings() | template_dir() | trusted_dir() | use_sub_dirs() |
No constants found
__construct() | _compile_resource() | _compile_source() | _dequote() | _eval() | _fetch_resource_info() | _get_auto_filename() | _get_auto_id() | _get_compile_path() | _get_filter_name() | _get_plugin_filepath() | _include() | _is_compiled() | _parse_resource_name() | _process_compiled_include_callback() | _read_file() | _run_mod_handler() | _smarty_cache_attrs() | _smarty_include() | _syntax_error() | _trigger_fatal_error() | _unlink() | append() | append_by_ref() | assign() | assign_by_ref() | clear_all_assign() | clear_all_cache() | clear_assign() | clear_cache() | clear_compiled_tpl() | clear_config() | config_load() | display() | fetch() | get_config_vars() | get_registered_object() | get_template_vars() | is_cached() | load_filter() | register_block() | register_compiler_function() | register_function() | register_modifier() | register_object() | register_outputfilter() | register_postfilter() | register_prefilter() | register_resource() | template_exists() | trigger_error() | unregister_block() | unregister_compiler_function() | unregister_function() | unregister_modifier() | unregister_object() | unregister_outputfilter() | unregister_postfilter() | unregister_prefilter() | unregister_resource() |
name of optional cache include file
public $_cache_include : string
- Inherited from \Smarty
Array
indicate if the current code is used in a compiled include
public $_cache_including : string
- Inherited from \Smarty
Array
info that makes up a cache file
public $_cache_info : array
- Inherited from \Smarty
Array
cache serials
public $_cache_serials : array
- Inherited from \Smarty
Array
for different compiled templates
public $_compile_id : string
- Inherited from \Smarty
Array
configuration object
public $_conf_obj : \Config_file
- Inherited from \Smarty
Array
loaded configuration settings
public $_config : array
- Inherited from \Smarty
Array
default dir permissions
public $_dir_perms : int
- Inherited from \Smarty
Array
default file permissions
public $_file_perms : int
- Inherited from \Smarty
Array
keeps track of foreach blocks
public $_foreach : array
- Inherited from \Smarty
Array
current template inclusion depth
public $_inclusion_depth : int
- Inherited from \Smarty
Array
table keeping track of plugins
public $_plugins : array
- Inherited from \Smarty
Array
registered objects
public $_reg_objects : array
- Inherited from \Smarty
Array
keeps track of sections
public $_sections : array
- Inherited from \Smarty
Array
text in URL to enable debug mode
public $_smarty_debug_id : string
- Inherited from \Smarty
Array
debugging information for debug console
public $_smarty_debug_info : array
- Inherited from \Smarty
Array
md5 checksum of the string 'Smarty'
public $_smarty_md5 : string
- Inherited from \Smarty
Array
stores run-time $smarty.* vars
public $_smarty_vars : null|array
- Inherited from \Smarty
Array
keeps track of tag hierarchy
public $_tag_stack : array
- Inherited from \Smarty
Array
where assigned template vars are kept
public $_tpl_vars : array
- Inherited from \Smarty
Array
Smarty version number
public $_version : string
- Inherited from \Smarty
Array
This indicates which filters are automatically loaded into Smarty.
public $autoload_filters : array
- Inherited from \Smarty
Array: array of filter names
The name of the directory for cache files.
public $cache_dir : string
- Inherited from \Smarty
Array
The function used for cache file handling. If not set, built-in caching is used.
public $cache_handler_func : null|string
- Inherited from \Smarty
Array: function name
This is the number of seconds cached content will persist.
Array
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.
public$cache_modified_check : bool
- Inherited from \Smarty
Array
This enables template caching.
Array
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.
public$compile_check : bool
- Inherited from \Smarty
Array
The directory where compiled templates are located.
public $compile_dir : string
- Inherited from \Smarty
Array
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'.
public$compile_id : string
- Inherited from \Smarty
Array
The class used for compiling templates.
public $compiler_class : string
- Inherited from \Smarty
Array
The file that contains the compiler class. This can a full pathname, or relative to the php_include path.
public $compiler_file : string
- Inherited from \Smarty
Array
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.
public$config_booleanize
- Inherited from \Smarty
The class used to load config vars.
public $config_class : string
- Inherited from \Smarty
Array
The directory where config files are located.
public $config_dir : string
- Inherited from \Smarty
Array
This tells whether or not automatically fix newlines in config files.
It basically converts \r (mac) or \r\n (dos) to \n
public$config_fix_newlines
- Inherited from \Smarty
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.
public$config_overwrite
- Inherited from \Smarty
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.
public $config_read_hidden
- Inherited from \Smarty
This is the path to the debug console template. If not set, the default one will be used.
public $debug_tpl : string
- Inherited from \Smarty
Array
If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows)
public $debugging : bool
- Inherited from \Smarty
Array
This determines if debugging is enable-able from the browser.
Array See also
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"');public$default_modifiers : array
- Inherited from \Smarty
Array
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 *}
public $default_resource_type : array
- Inherited from \Smarty
Array
If a template cannot be found, this PHP function will be executed.
Useful for creating templates on-the-fly or other special action.
public$default_template_handler_func : string
- Inherited from \Smarty
Array: function name
When set, smarty does uses this value as error_reporting-level.
public $error_reporting : int
- Inherited from \Smarty
Array
This forces templates to compile every time. Useful for development or debugging.
public $force_compile : bool
- Inherited from \Smarty
Array
The left delimiter used for the template tags.
public $left_delimiter : string
- Inherited from \Smarty
Array
This determines how Smarty handles "<?php ... ?>" tags in templates.
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
Array
An array of directories searched for plugins.
public $plugins_dir : array
- Inherited from \Smarty
Array
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"
public $request_use_auto_globals : bool
- Inherited from \Smarty
Array
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
public $request_vars_order : string
- Inherited from \Smarty
Array
The right delimiter used for the template tags.
public $right_delimiter : string
- Inherited from \Smarty
Array
This is the list of template directories that are considered secure. This is used only if {@link $security} is enabled. One directory per array element. {@link $template_dir} is in this list implicitly.
public $secure_dir : array
- Inherited from \Smarty
Array
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)
public $security : bool
- Inherited from \Smarty
Array
These are the security settings for Smarty. They are used only when {@link $security} is enabled.
public $security_settings : array
- Inherited from \Smarty
Array
The name of the directory where templates are located.
public $template_dir : string
- Inherited from \Smarty
Array
This is an array of directories where trusted php scripts reside.
$security is disabled during their inclusion/execution.
public$trusted_dir : array
- Inherited from \Smarty
Array
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.
public $use_sub_dirs : bool
- Inherited from \Smarty
Array
The class constructor.
- Inherited from \Smarty
public __construct() : mixed
compile the template
- Inherited from \Smarty
public _compile_resource(string $resource_name, string $compile_path) : bool
compile the given source
- Inherited from \Smarty
public _compile_source(string $resource_name, string $source_content, string $compiled_content, mixed $cache_include_path = null) : bool
Remove starting and ending quotes from the string
- Inherited from \Smarty
public _dequote(string $string) : string
wrapper for eval() retaining $this
- Inherited from \Smarty
public _eval(mixed $code, mixed $params = null) : mixed
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
- Inherited from \Smarty
public _fetch_resource_info(mixed $params) : bool
get a concrete filename for automagically created content
- Inherited from \Smarty
public _get_auto_filename(string $auto_base, string $auto_source = null, string $auto_id = null) : string
- staticvar: string|null
- staticvar: string|null
returns an auto_id for auto-file-functions
- Inherited from \Smarty
public _get_auto_id(string $cache_id = null, string $compile_id = null) : string|null
Get the compile path for this resource
- Inherited from \Smarty
public _get_compile_path(string $resource_name) : string
Extracts the filter name from the given callback
- Inherited from \Smarty
public _get_filter_name(callable $function) : string
get filepath of requested plugin
- Inherited from \Smarty
public _get_plugin_filepath(string $type, string $name) : string|bool
wrapper for include() retaining $this
- Inherited from \Smarty
public _include(mixed $filename, mixed $once = false, mixed $params = null) : mixed
test if resource needs compiling
- Inherited from \Smarty
public _is_compiled(string $resource_name, string $compile_path) : bool
parse out the type and name from the resource
- Inherited from \Smarty
public _parse_resource_name(mixed $params) : bool
callback function for preg_replace, to call a non-cacheable block
- Inherited from \Smarty
public _process_compiled_include_callback(mixed $match) : string
read in a file
- Inherited from \Smarty
public _read_file(string $filename) : string
Handle modifiers
- Inherited from \Smarty
public _run_mod_handler() : string
get or set an array of cached attributes for function that is not cacheable
- Inherited from \Smarty
public _smarty_cache_attrs(mixed $cache_serial, mixed $count) : array
- Inherited from \Smarty
public _smarty_include(mixed $params) : mixed
display Smarty syntax error
- Inherited from \ZorgSmarty_Compiler
public _syntax_error(string $error_msg, int $error_type = E_USER_ERROR, string $file = null, int $line = null) : mixed
trigger Smarty plugin error
- Inherited from \Smarty
public _trigger_fatal_error(string $error_msg, string $tpl_file = null, int $tpl_line = null, string $file = null, int $line = null, int $error_type = E_USER_ERROR) : mixed
unlink a file, possibly using expiration time
- Inherited from \Smarty
public _unlink(string $resource, int $exp_time = null) : mixed
appends values to template variables
- Inherited from \Smarty
public append(array|string $tpl_var, mixed $value = null, mixed $merge = false) : mixed
appends values to template variables by reference
- Inherited from \Smarty
public append_by_ref(string $tpl_var, mixed $value, mixed $merge = false) : mixed
assigns values to template variables
- Inherited from \Smarty
public assign(array|string $tpl_var, mixed $value = null) : mixed
assigns values to template variables by reference
- Inherited from \Smarty
public assign_by_ref(string $tpl_var, mixed $value) : mixed
clear all the assigned template variables.
- Inherited from \Smarty
public clear_all_assign() : mixed
clear the entire contents of cache (all templates)
- Inherited from \Smarty
public clear_all_cache(string $exp_time = null) : bool
clear the given assigned template variable.
- Inherited from \Smarty
public clear_assign(string $tpl_var) : mixed
clear cached content for the given template and cache id
- Inherited from \Smarty
public clear_cache(string $tpl_file = null, string $cache_id = null, string $compile_id = null, string $exp_time = null) : bool
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.
- Inherited from \Smarty
public clear_compiled_tpl(string $tpl_file = null, string $compile_id = null, string $exp_time = null) : bool
clear configuration values
- Inherited from \Smarty
public clear_config(string $var = null) : mixed
load configuration values
- Inherited from \Smarty
public config_load(string $file, string $section = null, string $scope = 'global') : mixed
executes & displays the template results
- Inherited from \Smarty
public display(string $resource_name, string $cache_id = null, string $compile_id = null) : mixed
executes & returns or displays the template results
- Inherited from \Smarty
public fetch(string $resource_name, string $cache_id = null, string $compile_id = null, bool $display = false) : mixed
Returns an array containing config variables
- Inherited from \Smarty
public get_config_vars(string $name = null) : array
return a reference to a registered object
- Inherited from \Smarty
public get_registered_object(string $name) : object
Returns an array containing template variables
- Inherited from \Smarty
public get_template_vars(string $name = null) : array
test to see if valid cache exists for this template
- Inherited from \Smarty
public is_cached(string $tpl_file, string $cache_id = null, string $compile_id = null) : string|bool
load a filter of specified type and name
- Inherited from \Smarty
public load_filter(string $type, string $name) : mixed
Registers block function to be used in templates
- Inherited from \Smarty
public register_block(string $block, string $block_impl, mixed $cacheable = true, mixed $cache_attrs = null) : mixed
Registers compiler function
- Inherited from \Smarty
public register_compiler_function(string $function, string $function_impl, mixed $cacheable = true) : mixed
Registers custom function to be used in templates
- Inherited from \Smarty
public register_function(string $function, string $function_impl, mixed $cacheable = true, mixed $cache_attrs = null) : mixed
Registers modifier to be used in templates
- Inherited from \Smarty
public register_modifier(string $modifier, string $modifier_impl) : mixed
Registers object to be used in templates
- Inherited from \Smarty
public register_object(string $object, mixed $object_impl, null|array $allowed = array(), bool $smarty_args = true, mixed $block_methods = array()) : mixed
Registers an output filter function to apply to a template output
- Inherited from \Smarty
public register_outputfilter(callable $function) : mixed
Registers a postfilter function to apply to a compiled template after compilation
- Inherited from \Smarty
public register_postfilter(callable $function) : mixed
Registers a prefilter function to apply to a template before compiling
- Inherited from \Smarty
public register_prefilter(callable $function) : mixed
Registers a resource to fetch a template
- Inherited from \Smarty
public register_resource(string $type, array $functions) : mixed
Checks whether requested template exists.
- Inherited from \Smarty
public template_exists(string $tpl_file) : bool
trigger Smarty error
- Inherited from \Smarty
public trigger_error(string $error_msg, int $error_type = E_USER_WARNING) : mixed
Unregisters block function
- Inherited from \Smarty
public unregister_block(string $block) : mixed
Unregisters compiler function
- Inherited from \Smarty
public unregister_compiler_function(string $function) : mixed
Unregisters custom function
- Inherited from \Smarty
public unregister_function(string $function) : mixed
Unregisters modifier
- Inherited from \Smarty
public unregister_modifier(string $modifier) : mixed
Unregisters object
- Inherited from \Smarty
public unregister_object(string $object) : mixed
Unregisters an outputfilter function
- Inherited from \Smarty
public unregister_outputfilter(callable $function) : mixed
Unregisters a postfilter function
- Inherited from \Smarty
public unregister_postfilter(callable $function) : mixed
Unregisters a prefilter function
- Inherited from \Smarty
public unregister_prefilter(callable $function) : mixed
Unregisters a resource
- Inherited from \Smarty
public unregister_resource(string $type) : mixed
\ » Classes » ZorgSmarty_Compiler
Documentation generated on April 26th, 2020 at 15:54.
Powered by phpDocumentor with template GitHub-wiki.