diff options
author | Wave <wave72@users.noreply.github.com> | 2015-12-20 10:20:36 +0100 |
---|---|---|
committer | Wave <wave72@users.noreply.github.com> | 2015-12-20 10:20:36 +0100 |
commit | 2aad4c2cf9c17a7532089aadfcc5feff6505ec74 (patch) | |
tree | 2082c8dc7ba090f610874b6e33b0f1092a2ff00c /library/Smarty/libs/sysplugins/smarty_internal_method_clearconfig.php | |
parent | 474a1267d73c1dcf00678dd15ed4e0e37496473d (diff) | |
parent | e2692a4baaf031bd0d9c0893c3762637b1f6b201 (diff) | |
download | volse-hubzilla-2aad4c2cf9c17a7532089aadfcc5feff6505ec74.tar.gz volse-hubzilla-2aad4c2cf9c17a7532089aadfcc5feff6505ec74.tar.bz2 volse-hubzilla-2aad4c2cf9c17a7532089aadfcc5feff6505ec74.zip |
Merge pull request #4 from redmatrix/master
Merge master into dev branch
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_method_clearconfig.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_method_clearconfig.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_method_clearconfig.php b/library/Smarty/libs/sysplugins/smarty_internal_method_clearconfig.php new file mode 100644 index 000000000..9c6167f4d --- /dev/null +++ b/library/Smarty/libs/sysplugins/smarty_internal_method_clearconfig.php @@ -0,0 +1,41 @@ +<?php + +/** + * Smarty Method ClearConfig + * + * Smarty::clearConfig() method + * + * @package Smarty + * @subpackage PluginsInternal + * @author Uwe Tews + */ +class Smarty_Internal_Method_ClearConfig +{ + /** + * Valid for all objects + * + * @var int + */ + public $objMap = 7; + + /** + * clear a single or all config variables + * + * @api Smarty::clearConfig() + * @link http://www.smarty.net/docs/en/api.clear.config.tpl + * + * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data + * @param string|null $name variable name or null + * + * @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty + */ + public function clearConfig(Smarty_Internal_Data $data, $name = null) + { + if (isset($name)) { + unset($data->config_vars[$name]); + } else { + $data->config_vars = array(); + } + return $data; + } +}
\ No newline at end of file |