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