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