4 * Smarty Method SetDebugTemplate
6 * Smarty::setDebugTemplate() method
9 * @subpackage PluginsInternal
12 class Smarty_Internal_Method_SetDebugTemplate
15 * Valid for Smarty and template object
22 * set the debug template
24 * @api Smarty::setDebugTemplate()
26 * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
27 * @param string $tpl_name
29 * @return \Smarty|\Smarty_Internal_Template
30 * @throws SmartyException if file is not readable
32 public function setDebugTemplate(Smarty_Internal_TemplateBase $obj, $tpl_name)
34 $smarty = $obj->_getSmartyObj();
35 if (!is_readable($tpl_name)) {
36 throw new SmartyException("Unknown file '{$tpl_name}'");
38 $smarty->debug_tpl = $tpl_name;