1 | <?php |
||
11 | class FluidRenderer |
||
12 | { |
||
13 | /** |
||
14 | * The initial rendering context for this template view. |
||
15 | * Due to the rendering stack, another rendering context might be active |
||
16 | * at certain points while rendering the template. |
||
17 | * |
||
18 | * @var RenderingContextInterface |
||
19 | */ |
||
20 | protected $baseRenderingContext; |
||
21 | |||
22 | /** |
||
23 | * Stack containing the current rendering type, the current rendering context, and the current parsed template |
||
24 | * Do not manipulate directly, instead use the methods"getCurrent*()", "startRendering(...)" and "stopRendering()" |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $renderingStack = []; |
||
29 | |||
30 | /** |
||
31 | * @var callable|null |
||
32 | * @deprecated Will be removed in Fluid 4.0 |
||
33 | */ |
||
34 | protected $baseTemplateClosure; |
||
35 | |||
36 | /** |
||
37 | * @var callable|null |
||
38 | * @deprecated Will be removed in Fluid 4.0 |
||
39 | */ |
||
40 | protected $baseIdentifierClosure; |
||
41 | |||
42 | public function __construct(RenderingContextInterface $renderingContext) |
||
46 | |||
47 | public function getComponentBeingRendered(): ?ComponentInterface |
||
51 | |||
52 | /** |
||
53 | * @param callable|null $baseTemplateClosure |
||
54 | * @return FluidRenderer |
||
55 | * @deprecated Will be removed in Fluid 4.0 |
||
56 | */ |
||
57 | public function setBaseTemplateClosure(?callable $baseTemplateClosure): self |
||
62 | |||
63 | /** |
||
64 | * @param callable|null $baseIdentifierClosure |
||
65 | * @return FluidRenderer |
||
66 | * @deprecated Will be removed in Fluid 4.0 |
||
67 | */ |
||
68 | public function setBaseIdentifierClosure(?callable $baseIdentifierClosure): self |
||
73 | |||
74 | public function getRenderingContext(): RenderingContextInterface |
||
78 | |||
79 | public function setRenderingContext(RenderingContextInterface $renderingContext): void |
||
83 | |||
84 | public function renderSource(string $source) |
||
107 | |||
108 | public function renderComponent(ComponentInterface $component) |
||
115 | |||
116 | /** |
||
117 | * Loads the template source and render the template. |
||
118 | * If "layoutName" is set in a PostParseFacet callback, it will render the file with the given layout. |
||
119 | * |
||
120 | * @param string $filePathAndName |
||
121 | * @return mixed Rendered Template |
||
122 | */ |
||
123 | public function renderFile(string $filePathAndName) |
||
127 | |||
128 | /** |
||
129 | * Renders a given section. |
||
130 | * |
||
131 | * Deprecated in favor of the Atoms concept which can be accessed through the ViewHelperResolver. |
||
132 | * |
||
133 | * A section can be rendered by resolving the appropriate (template, layout or partial-like) |
||
134 | * Atom and using either getTypedChildren() or getNamedChild() to extract the desired section |
||
135 | * and render it via the Component interface the return value implements. |
||
136 | * |
||
137 | * @param string $sectionName Name of section to render |
||
138 | * @param array $variables The variables to use |
||
139 | * @param boolean $ignoreUnknown Ignore an unknown section and just return an empty string |
||
140 | * @return mixed rendered template for the section |
||
141 | * @throws ChildNotFoundException |
||
142 | * @throws InvalidTemplateResourceException |
||
143 | * @throws Exception |
||
144 | */ |
||
145 | public function renderSection(string $sectionName, array $variables = [], bool $ignoreUnknown = false) |
||
178 | |||
179 | /** |
||
180 | * Renders a partial. |
||
181 | * |
||
182 | * Deprecated in favor of Atoms concept which can be accessed through the |
||
183 | * ViewHelperResolver to fetch and render a (partial-like) Atom directly. |
||
184 | * |
||
185 | * @param string $partialName |
||
186 | * @param string|null $sectionName |
||
187 | * @param array $variables |
||
188 | * @param boolean $ignoreUnknown Ignore an unknown section and just return an empty string |
||
189 | * @return mixed |
||
190 | * @throws ChildNotFoundException |
||
191 | * @throws InvalidTemplateResourceException |
||
192 | * @throws Exception |
||
193 | * @deprecated Will be removed in Fluid 4.0 |
||
194 | */ |
||
195 | public function renderPartial(string $partialName, ?string $sectionName, array $variables = [], bool $ignoreUnknown = false) |
||
228 | |||
229 | protected function getCurrentParsedTemplate(): ComponentInterface |
||
251 | } |
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.