1 | <?php |
||
11 | class Page implements ContainerInjectableInterface |
||
12 | { |
||
13 | use ContainerInjectableTrait; |
||
14 | |||
15 | |||
16 | |||
17 | /** |
||
18 | * @var array $layout to hold tha layout view to be rendered last. |
||
19 | */ |
||
20 | private $layout; |
||
21 | |||
22 | |||
23 | |||
24 | /** |
||
25 | * Set the view to be used for the layout. |
||
26 | * |
||
27 | * @param array $view configuration to create up the view. |
||
28 | * |
||
29 | * @return $this |
||
30 | */ |
||
31 | 1 | public function addLayout(array $view) : object |
|
36 | |||
37 | |||
38 | |||
39 | /** |
||
40 | * Utility method to add a view to the view collection for later |
||
41 | * rendering. |
||
42 | * |
||
43 | * @param array|string $template the name of the template file to include |
||
44 | * or array with view details. |
||
45 | * @param array $data variables to make available to the view, |
||
46 | * default is empty. |
||
47 | * @param string $region which region to attach the view, default |
||
48 | * is "main". |
||
49 | * @param integer $sort which order to display the views. |
||
50 | * |
||
51 | * @return $this |
||
52 | */ |
||
53 | 2 | public function add( |
|
62 | |||
63 | |||
64 | |||
65 | /** |
||
66 | * Add the layout view to the region "layout and render all views |
||
67 | * within the region "layout", and create a response from it. |
||
68 | * |
||
69 | * @param array $data additional variables to expose to layout view. |
||
70 | * @param integer $status code to use when delivering the result. |
||
71 | * |
||
72 | * @return object |
||
73 | */ |
||
74 | public function render(array $data = [], int $status = 200) |
||
85 | } |
||
86 |