Files
Smarty-Extended/src/BlockHandler/BlockPluginWrapper.php

19 lines
428 B
PHP
Raw Normal View History

<?php
namespace Smarty\BlockHandler;
use Smarty\Template;
class BlockPluginWrapper extends Base {
private $callback;
public function __construct($callback, bool $cacheable = true) {
$this->callback = $callback;
$this->cacheable = $cacheable;
}
public function handle($params, $content, Template $template, &$repeat) {
2024-12-26 17:59:29 +09:00
return \call_user_func_array($this->callback, [$params, $content, &$template, &$repeat]);
}
}