Total Complexity | 4 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class DefaultController |
||
12 | { |
||
13 | /** |
||
14 | * @var Templater |
||
15 | */ |
||
16 | private $templater; |
||
17 | |||
18 | 4 | public function __construct() |
|
19 | { |
||
20 | 4 | $this->templater = new Templater(); |
|
21 | 4 | } |
|
22 | |||
23 | 3 | public function notFoundAction() |
|
26 | } |
||
27 | |||
28 | 1 | public function render($template, array $params): ResponseInterface |
|
29 | { |
||
30 | 1 | $view = $this->templater->render($template, $params); |
|
31 | |||
32 | 1 | return $this->returnResponse($view); |
|
33 | } |
||
34 | |||
35 | 4 | public function returnResponse($body = '', $statusCode = 200): ResponseInterface |
|
43 | } |
||
44 | } |
||
45 |