1 | <?php declare(strict_types=1); |
||
26 | class NullView implements View, NullFindable |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * Check whether the Findable can handle an individual criterion. |
||
31 | * |
||
32 | * @since 0.1.0 |
||
33 | * |
||
34 | * @param mixed $criterion Criterion to check. |
||
35 | * |
||
36 | * @return bool Whether the Findable can handle the criterion. |
||
37 | */ |
||
38 | public function canHandle($criterion): bool |
||
42 | |||
43 | /** |
||
44 | * Render the view. |
||
45 | * |
||
46 | * @since 0.1.0 |
||
47 | * |
||
48 | * @param array $context Optional. The context in which to render the view. |
||
49 | * @param bool $echo Optional. Whether to echo the output immediately. Defaults to false. |
||
50 | * |
||
51 | * @return string Rendered HTML. |
||
52 | */ |
||
53 | 1 | public function render(array $context = [], bool $echo = false): string |
|
57 | |||
58 | /** |
||
59 | * Render a partial view (or section) for a given URI. |
||
60 | * |
||
61 | * @since 0.2.0 |
||
62 | * |
||
63 | * @param string $view View identifier to create a view for. |
||
64 | * @param array $context Optional. The context in which to render the view. |
||
65 | * @param string|null $type Type of view to create. |
||
66 | * |
||
67 | * @return string Rendered HTML content. |
||
68 | */ |
||
69 | public function section(string $view, array $context = [], $type = null): string |
||
73 | |||
74 | /** |
||
75 | * Get the entire array of contextual data. |
||
76 | * |
||
77 | * @since 0.4.0 |
||
78 | * |
||
79 | * @return array Array of contextual data. |
||
80 | */ |
||
81 | public function getContext(): array |
||
85 | |||
86 | /** |
||
87 | * Associate a view builder with this view. |
||
88 | * |
||
89 | * @since 0.2.0 |
||
90 | * |
||
91 | * @param ViewBuilder $builder |
||
92 | * |
||
93 | * @return View |
||
94 | */ |
||
95 | public function setBuilder(ViewBuilder $builder): View |
||
99 | } |
||
100 |