Files
smarty/libs/sysplugins/method.registerdefaulttemplatehandler.php

36 lines
758 B
PHP
Raw Normal View History

<?php
/**
* Smarty method registerDefaultTemplateHandler
*
* Registers a default template handler
*
* @package Smarty
* @subpackage SmartyMethod
* @author Uwe Tews
*/
/**
* Smarty class registerDefaultTemplateHandler
*
* Registers a default template handler
*/
class Smarty_Method_registerDefaultTemplateHandler extends Smarty_Internal_Base {
/**
* Registers a default template handler
*
2009-04-04 15:46:09 +00:00
* @param string $ |array $function class/methode name
*/
2009-04-04 15:46:09 +00:00
public function execute($function)
{
2009-04-04 15:46:09 +00:00
if (is_callable($function)) {
$this->smarty->default_template_handler_func = $function;
} else {
2009-04-04 15:46:09 +00:00
throw new Exception('Default template handler "'.$function.'" not callable');
}
}
}
?>