4 * Smarty Method RegisterDefaultConfigHandler
6 * Smarty::registerDefaultConfigHandler() method
9 * @subpackage PluginsInternal
12 class Smarty_Internal_Method_RegisterDefaultConfigHandler
15 * Valid for Smarty and template object
22 * Register config default handler
24 * @api Smarty::registerDefaultConfigHandler()
26 * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
27 * @param callable $callback class/method name
29 * @return \Smarty|\Smarty_Internal_Template
30 * @throws SmartyException if $callback is not callable
32 public function registerDefaultConfigHandler(Smarty_Internal_TemplateBase $obj, $callback)
34 $smarty = $obj->_getSmartyObj();
35 if (is_callable($callback)) {
36 $smarty->default_config_handler_func = $callback;
38 throw new SmartyException("Default config handler not callable");