![]() |
Wismas
1.1
BTS SN-IR La Salle Avignon 2017
|
Fonctions membres publiques | |
__construct (array $options=array()) | |
assign_by_ref ($tpl_var, &$value) | |
append_by_ref ($tpl_var, &$value, $merge=false) | |
clear_assign ($tpl_var) | |
register_function ($function, $function_impl, $cacheable=true, $cache_attrs=null) | |
unregister_function ($function) | |
register_object ($object, $object_impl, $allowed=array(), $smarty_args=true, $block_methods=array()) | |
unregister_object ($object) | |
register_block ($block, $block_impl, $cacheable=true, $cache_attrs=null) | |
unregister_block ($block) | |
register_compiler_function ($function, $function_impl, $cacheable=true) | |
unregister_compiler_function ($function) | |
register_modifier ($modifier, $modifier_impl) | |
unregister_modifier ($modifier) | |
register_resource ($type, $functions) | |
unregister_resource ($type) | |
register_prefilter ($function) | |
unregister_prefilter ($function) | |
register_postfilter ($function) | |
unregister_postfilter ($function) | |
register_outputfilter ($function) | |
unregister_outputfilter ($function) | |
load_filter ($type, $name) | |
clear_cache ($tpl_file=null, $cache_id=null, $compile_id=null, $exp_time=null) | |
clear_all_cache ($exp_time=null) | |
is_cached ($tpl_file, $cache_id=null, $compile_id=null) | |
clear_all_assign () | |
clear_compiled_tpl ($tpl_file=null, $compile_id=null, $exp_time=null) | |
template_exists ($tpl_file) | |
get_template_vars ($name=null) | |
get_config_vars ($name=null) | |
config_load ($file, $section=null, $scope= 'global') | |
get_registered_object ($name) | |
clear_config ($var=null) | |
trigger_error ($error_msg, $error_type=E_USER_WARNING) | |
Attributs publics | |
$_version = self::SMARTY_VERSION | |
$trusted_dir = array() |
SmartyBC::__construct | ( | array $ | options = array() | ) |
Initialize new SmartyBC object
array | $options | options to set during initialization, e.g. array( 'forceCompile' => false ) |
Références Smarty\__construct().
{ parent::__construct($options); }
SmartyBC::append_by_ref | ( | $ | tpl_var, |
&$ | value, | ||
$ | merge = false |
||
) |
wrapper for append_by_ref
string | $tpl_var | the template variable name |
mixed | &$value | the referenced value to append |
boolean | $merge | flag if array elements shall be merged |
{ $this->appendByRef($tpl_var, $value, $merge); }
SmartyBC::assign_by_ref | ( | $ | tpl_var, |
&$ | value | ||
) |
wrapper for assign_by_ref
string | $tpl_var | the template variable name |
mixed | &$value | the referenced value to assign |
{ $this->assignByRef($tpl_var, $value); }
clear all the assigned template variables.
{ $this->clearAllAssign(); }
SmartyBC::clear_all_cache | ( | $ | exp_time = null | ) |
clear the entire contents of cache (all templates)
string | $exp_time | expire time |
{
return $this->clearCache(null, null, null, $exp_time);
}
SmartyBC::clear_assign | ( | $ | tpl_var | ) |
clear the given assigned template variable.
string | $tpl_var | the template variable to clear |
{ $this->clearAssign($tpl_var); }
SmartyBC::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 |
{
return $this->clearCache($tpl_file, $cache_id, $compile_id, $exp_time);
}
SmartyBC::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 |
{
return $this->clearCompiledTemplate($tpl_file, $compile_id, $exp_time);
}
SmartyBC::clear_config | ( | $ | var = null | ) |
clear configuration values
string | $var |
{ $this->clearConfig($var); }
SmartyBC::config_load | ( | $ | file, |
$ | section = null , |
||
$ | scope = 'global' |
||
) |
load configuration values
string | $file | |
string | $section | |
string | $scope |
{ $this->ConfigLoad($file, $section, $scope); }
SmartyBC::get_config_vars | ( | $ | name = null | ) |
Returns an array containing config variables
string | $name |
{
return $this->getConfigVars($name);
}
SmartyBC::get_registered_object | ( | $ | name | ) |
return a reference to a registered object
string | $name |
{
return $this->getRegisteredObject($name);
}
SmartyBC::get_template_vars | ( | $ | name = null | ) |
Returns an array containing template variables
string | $name |
{
return $this->getTemplateVars($name);
}
SmartyBC::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 |
{
return $this->isCached($tpl_file, $cache_id, $compile_id);
}
SmartyBC::load_filter | ( | $ | type, |
$ | name | ||
) |
load a filter of specified type and name
string | $type | filter type |
string | $name | filter name |
{ $this->loadFilter($type, $name); }
SmartyBC::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 |
bool | $cacheable | |
mixed | $cache_attrs |
{
$this->registerPlugin('block', $block, $block_impl, $cacheable, $cache_attrs);
}
SmartyBC::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 |
bool | $cacheable |
{
$this->registerPlugin('compiler', $function, $function_impl, $cacheable);
}
SmartyBC::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 |
bool | $cacheable | |
mixed | $cache_attrs |
{
$this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs);
}
SmartyBC::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 |
{
$this->registerPlugin('modifier', $modifier, $modifier_impl);
}
SmartyBC::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 |
array | $allowed | list of allowed methods (empty = all) |
boolean | $smarty_args | smarty argument format, else traditional |
array | $block_methods | list of methods that are block format |
SmartyException |
{ settype($allowed, 'array'); settype($smarty_args, 'boolean'); $this->registerObject($object, $object_impl, $allowed, $smarty_args, $block_methods); }
SmartyBC::register_outputfilter | ( | $ | function | ) |
Registers an output filter function to apply to a template output
callable | $function |
{
$this->registerFilter('output', $function);
}
SmartyBC::register_postfilter | ( | $ | function | ) |
Registers a postfilter function to apply to a compiled template after compilation
callable | $function |
{
$this->registerFilter('post', $function);
}
SmartyBC::register_prefilter | ( | $ | function | ) |
Registers a prefilter function to apply to a template before compiling
callable | $function |
{
$this->registerFilter('pre', $function);
}
SmartyBC::register_resource | ( | $ | type, |
$ | functions | ||
) |
Registers a resource to fetch a template
string | $type | name of resource |
array | $functions | array of functions to handle resource |
{ $this->registerResource($type, $functions); }
SmartyBC::template_exists | ( | $ | tpl_file | ) |
Checks whether requested template exists.
string | $tpl_file |
Références Smarty\templateExists().
{ return $this->templateExists($tpl_file); }
SmartyBC::trigger_error | ( | $ | error_msg, |
$ | error_type = E_USER_WARNING |
||
) |
trigger Smarty error
string | $error_msg | |
integer | $error_type |
{ trigger_error("Smarty error: $error_msg", $error_type); }
SmartyBC::unregister_block | ( | $ | block | ) |
Unregisters block function
string | $block | name of template function |
{
$this->unregisterPlugin('block', $block);
}
SmartyBC::unregister_compiler_function | ( | $ | function | ) |
Unregisters compiler function
string | $function | name of template function |
{
$this->unregisterPlugin('compiler', $function);
}
SmartyBC::unregister_function | ( | $ | function | ) |
Unregisters custom function
string | $function | name of template function |
{
$this->unregisterPlugin('function', $function);
}
SmartyBC::unregister_modifier | ( | $ | modifier | ) |
Unregisters modifier
string | $modifier | name of template modifier |
{
$this->unregisterPlugin('modifier', $modifier);
}
SmartyBC::unregister_object | ( | $ | object | ) |
Unregisters object
string | $object | name of template object |
{ $this->unregisterObject($object); }
SmartyBC::unregister_outputfilter | ( | $ | function | ) |
Unregisters an outputfilter function
callable | $function |
{
$this->unregisterFilter('output', $function);
}
SmartyBC::unregister_postfilter | ( | $ | function | ) |
Unregisters a postfilter function
callable | $function |
{
$this->unregisterFilter('post', $function);
}
SmartyBC::unregister_prefilter | ( | $ | function | ) |
Unregisters a prefilter function
callable | $function |
{
$this->unregisterFilter('pre', $function);
}
SmartyBC::unregister_resource | ( | $ | type | ) |
Unregisters a resource
string | $type | name of resource |
{ $this->unregisterResource($type); }
SmartyBC::$_version = self::SMARTY_VERSION |
SmartyBC::$trusted_dir = array() |