funchat/core/template/src/FunctionHandler/BCPluginWrapper.php
2025-06-02 22:38:25 +02:00

21 lines
No EOL
380 B
PHP

<?php
namespace Smarty\FunctionHandler;
use Smarty\Template;
class BCPluginWrapper extends Base {
private $callback;
public function __construct($callback, bool $cacheable = true) {
$this->callback = $callback;
$this->cacheable = $cacheable;
}
public function handle($params, Template $template) {
$func = $this->callback;
return $func($params, $template);
}
}