Code

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