[gosa.git] / gosa-core / include / smarty / sysplugins / smarty_method_registerdefaulttemplatehandler.php
1 <?php
3 /**
4 * Smarty method RegisterDefaultTemplateHandler
5 *
6 * Registers a default template handler
7 *
8 * @package Smarty
9 * @subpackage SmartyMethod
10 * @author Uwe Tews
11 */
13 /**
14 * Registers a default template handler
15 *
16 * @param object $smarty
17 * @param string $ |array $function class/methode name
18 */
19 function Smarty_Method_RegisterDefaultTemplateHandler($smarty, $function)
20 {
21 if (is_callable($function)) {
22 $smarty->default_template_handler_func = $function;
23 } else {
24 throw new Exception('Default template handler "' . $function . '" not callable');
25 }
26 }
28 ?>