summaryrefslogtreecommitdiff
path: root/src/BlockHandler/BlockPluginWrapper.php
blob: b6236a67e673c007e68484c467f29aa1012b9000 (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]);
	}
}