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