mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-06 07:11:37 +01:00
36 lines
734 B
PHP
36 lines
734 B
PHP
|
|
<?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
|
||
|
|
*
|
||
|
|
* @param string $ |array $plugin class/methode name
|
||
|
|
*/
|
||
|
|
public function execute($plugin)
|
||
|
|
{
|
||
|
|
if (is_callable($plugin)) {
|
||
|
|
$this->smarty->default_template_handler_func = $plugin;
|
||
|
|
} else {
|
||
|
|
throw new Exception("Default template handler not callable");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|