1 | <?php |
||
18 | class KitchensinkController |
||
19 | { |
||
20 | /** |
||
21 | * The data provider. |
||
22 | * |
||
23 | * @var DataProviderInterface |
||
24 | */ |
||
25 | private $dataProvider; |
||
26 | |||
27 | /** |
||
28 | * The template engine |
||
29 | * |
||
30 | * @var Environment |
||
31 | */ |
||
32 | private $templateEngine; |
||
33 | |||
34 | /** |
||
35 | * The template name. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private $templateName; |
||
40 | |||
41 | /** |
||
42 | * KitchensinkController constructor. |
||
43 | * |
||
44 | * @param DataProviderInterface $provider |
||
45 | * @param Environment $engine |
||
46 | * @param string $template |
||
47 | */ |
||
48 | 1 | public function __construct(DataProviderInterface $provider, Environment $engine, string $template) |
|
54 | |||
55 | /** |
||
56 | * Returns the view data from the data provider. |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | 1 | private function getViewData(): array |
|
73 | |||
74 | /** |
||
75 | * Renders the template for the kitchensink. |
||
76 | * |
||
77 | * @throws LoaderError Error while loading |
||
78 | * @throws RuntimeError Runtime errors |
||
79 | * @throws SyntaxError Syntax errors |
||
80 | * |
||
81 | * @return Response |
||
82 | */ |
||
83 | 1 | public function indexAction(): Response |
|
89 | } |
||
90 |