diff options
author | mrjive <mrjive@mrjive.it> | 2016-01-03 09:52:37 +0100 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2016-01-03 09:52:37 +0100 |
commit | 07f5bdde60f55e3b217aee9e33c3175e90a5f0f1 (patch) | |
tree | 2b5988c7661c9a5a67f5da8797ca57381e2aad7a /library/Smarty/libs/sysplugins/smarty_internal_method_setdebugtemplate.php | |
parent | 051346325609f5f2e78ef0deaf182c65d7823bbc (diff) | |
parent | 5b0a17359d6b5b3e27219c9e56117f1017996175 (diff) | |
download | volse-hubzilla-07f5bdde60f55e3b217aee9e33c3175e90a5f0f1.tar.gz volse-hubzilla-07f5bdde60f55e3b217aee9e33c3175e90a5f0f1.tar.bz2 volse-hubzilla-07f5bdde60f55e3b217aee9e33c3175e90a5f0f1.zip |
Merge pull request #10 from redmatrix/master
updating from original codebase
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_method_setdebugtemplate.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_method_setdebugtemplate.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_method_setdebugtemplate.php b/library/Smarty/libs/sysplugins/smarty_internal_method_setdebugtemplate.php new file mode 100644 index 000000000..4ff5d7f82 --- /dev/null +++ b/library/Smarty/libs/sysplugins/smarty_internal_method_setdebugtemplate.php @@ -0,0 +1,41 @@ +<?php + +/** + * Smarty Method SetDebugTemplate + * + * Smarty::setDebugTemplate() method + * + * @package Smarty + * @subpackage PluginsInternal + * @author Uwe Tews + */ +class Smarty_Internal_Method_SetDebugTemplate +{ + /** + * Valid for Smarty and template object + * + * @var int + */ + public $objMap = 3; + + /** + * set the debug template + * + * @api Smarty::setDebugTemplate() + * + * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj + * @param string $tpl_name + * + * @return \Smarty|\Smarty_Internal_Template + * @throws SmartyException if file is not readable + */ + public function setDebugTemplate(Smarty_Internal_TemplateBase $obj, $tpl_name) + { + $smarty = isset($obj->smarty) ? $obj->smarty : $obj; + if (!is_readable($tpl_name)) { + throw new SmartyException("Unknown file '{$tpl_name}'"); + } + $smarty->debug_tpl = $tpl_name; + return $obj; + } +}
\ No newline at end of file |