blob: 47005945660202e7d4ff5771b9ab2bbd9af4f3dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<?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) {
return call_user_func_array($this->callback, [$params, $content, &$template, &$repeat]);
}
}
|