2009-04-03 15:59:40 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
2009-11-03 20:38:38 +00:00
|
|
|
* Smarty method RegisterDefaultPluginhandlerHandler
|
2009-04-03 15:59:40 +00:00
|
|
|
*
|
|
|
|
|
* Registers a default plugin handler
|
|
|
|
|
*
|
|
|
|
|
* @package Smarty
|
|
|
|
|
* @subpackage SmartyMethod
|
|
|
|
|
* @author Uwe Tews
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Registers a default plugin handler
|
2009-08-08 17:28:23 +00:00
|
|
|
*
|
|
|
|
|
* @param object $smarty
|
|
|
|
|
* @param string $ |array $plugin class/methode name
|
2009-04-03 15:59:40 +00:00
|
|
|
*/
|
2009-11-03 20:38:38 +00:00
|
|
|
function Smarty_Method_RegisterDefaultPluginHandler($smarty, $plugin)
|
2009-08-08 17:28:23 +00:00
|
|
|
{
|
|
|
|
|
if (is_callable($plugin)) {
|
|
|
|
|
$smarty->default_plugin_handler_func = $plugin;
|
|
|
|
|
} else {
|
|
|
|
|
throw new Exception('Default plugin handler "' . $plugin . '" not callable');
|
2009-04-03 15:59:40 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|