Содержимое файла | Последнее изменение | Открыть журнал | RSS
Редакция | Автор | № строки | Строка |
---|---|---|---|
304 | alex-w | 1 | <?php |
2 | |||
3 | /** |
||
4 | * Smarty method registerDefaultTemplateHandler |
||
5 | * |
||
6 | * Registers a default template handler |
||
7 | * |
||
8 | * @package Smarty |
||
9 | * @subpackage SmartyMethod |
||
10 | * @author Uwe Tews |
||
11 | */ |
||
12 | |||
13 | /** |
||
14 | * Registers a default template handler |
||
15 | * |
||
16 | * @param object $smarty |
||
17 | * @param string $ |array $function class/methode name |
||
18 | */ |
||
19 | function 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 | } |
||
27 | |||
28 | ?> |