1 | <?php |
||
24 | trait ControllerTrait |
||
25 | { |
||
26 | private $viewhandler; |
||
27 | |||
28 | public function setViewHandler(ViewHandlerInterface $viewhandler) |
||
32 | |||
33 | protected function getViewHandler() |
||
41 | |||
42 | /** |
||
43 | * @return View |
||
44 | */ |
||
45 | 6 | protected function view($data = null, ?int $statusCode = null, array $headers = []) |
|
49 | |||
50 | /** |
||
51 | * @return View |
||
52 | */ |
||
53 | protected function redirectView(string $url, int $statusCode = Response::HTTP_FOUND, array $headers = []) |
||
57 | |||
58 | /** |
||
59 | * @return View |
||
60 | */ |
||
61 | 1 | protected function routeRedirectView(string $route, array $parameters = [], int $statusCode = Response::HTTP_CREATED, array $headers = []) |
|
65 | |||
66 | /** |
||
67 | * Converts view into a response object. |
||
68 | * |
||
69 | * Not necessary to use, if you are using the "ViewResponseListener", which |
||
70 | * does this conversion automatically in kernel event "onKernelView". |
||
71 | * |
||
72 | * @return Response |
||
73 | */ |
||
74 | protected function handleView(View $view) |
||
78 | } |
||
79 |