Total Complexity | 2 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | abstract class AbstractWidget |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var ContainerInterface |
||
14 | */ |
||
15 | protected $container; |
||
16 | /** |
||
17 | * @var ViewInterface |
||
18 | */ |
||
19 | protected $view; |
||
20 | |||
21 | /** |
||
22 | * @param ContainerInterface $container |
||
23 | */ |
||
24 | public function __construct(ContainerInterface $container) |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param array $params |
||
32 | * @return string |
||
33 | */ |
||
34 | abstract public function run(array $params = []): string; |
||
35 | |||
36 | /** |
||
37 | * @param string $templatePath |
||
38 | * @param array $vars |
||
39 | * |
||
40 | * @return string |
||
41 | * @throws \Exception |
||
42 | */ |
||
43 | protected function render(string $templatePath, array $vars = []): string |
||
48 |