1 | <?php |
||
19 | abstract class Controller |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Holds the views per controller request |
||
24 | * @var array |
||
25 | */ |
||
26 | private $viewArray = []; |
||
27 | |||
28 | /** |
||
29 | * Returns the service locator |
||
30 | * |
||
31 | * @return ServiceLocator |
||
32 | */ |
||
33 | public function getServiceLocator() |
||
37 | |||
38 | /** |
||
39 | * Returns the view controller |
||
40 | * |
||
41 | * @return ViewController |
||
42 | */ |
||
43 | public function getView() |
||
56 | |||
57 | /** |
||
58 | * Returns the orm/entity manager |
||
59 | * |
||
60 | * @return ORM|ServiceInterface |
||
61 | */ |
||
62 | public function getDb() |
||
66 | |||
67 | /** |
||
68 | * Render view with given template |
||
69 | * |
||
70 | * @param string $template |
||
71 | * @param array $variables |
||
72 | * @return string |
||
73 | */ |
||
74 | public function render(string $template = '', $variables = []) |
||
78 | |||
79 | } |