1 | <?php |
||
21 | abstract class AbstractViewHelper |
||
22 | { |
||
23 | |||
24 | /** @var ViewController */ |
||
25 | protected $view; |
||
26 | |||
27 | /** |
||
28 | * Render a view with given template and variables |
||
29 | * |
||
30 | * @param string $template |
||
31 | * @param array $variables |
||
32 | * |
||
33 | * @return string |
||
34 | * |
||
35 | * @throws ServiceNotFoundException |
||
36 | * @throws ConfigInvalidException |
||
37 | * @throws FileNotFoundException |
||
38 | */ |
||
39 | protected function renderView($template = '', array $variables = []) :string |
||
48 | |||
49 | /** |
||
50 | * @param ViewController $view |
||
51 | */ |
||
52 | public function setView(ViewController $view) |
||
56 | |||
57 | /** |
||
58 | * @return ViewController |
||
59 | */ |
||
60 | public function getView() |
||
64 | |||
65 | /** |
||
66 | * Get instance of service locator |
||
67 | * |
||
68 | * @return ServiceLocator |
||
69 | */ |
||
70 | public function getServiceLocator() :ServiceLocator |
||
74 | |||
75 | } |