[TASK] Sync CMS Fluid with Flow Fluid 1.1 (part1)
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / Core / Parser / ParsedTemplateInterface.php
1 <?php
2 namespace TYPO3\CMS\Fluid\Core\Parser;
3
4 /* *
5 * This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
6 * *
7 * It is free software; you can redistribute it and/or modify it under *
8 * the terms of the GNU Lesser General Public License, either version 3 *
9 * of the License, or (at your option) any later version. *
10 * *
11 * The TYPO3 project - inspiring people to share! *
12 * */
13
14 /**
15 * This interface is returned by \TYPO3\CMS\Fluid\Core\Parser\TemplateParser->parse()
16 * method and is a parsed template
17 */
18 interface ParsedTemplateInterface {
19
20 /**
21 * Render the parsed template with rendering context
22 *
23 * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext The rendering context to use
24 * @return string Rendered string
25 */
26 public function render(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
27
28 /**
29 * Returns a variable container used in the PostParse Facet.
30 *
31 * @todo remove
32 * @return \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer
33 */
34 public function getVariableContainer();
35
36 /**
37 * Returns the name of the layout that is defined within the current template via <f:layout name="..." />
38 * If no layout is defined, this returns NULL
39 * This requires the current rendering context in order to be able to evaluate the layout name
40 *
41 * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
42 * @return string
43 */
44 public function getLayoutName(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
45
46 /**
47 * Returns TRUE if the current template has a template defined via <f:layout name="..." />
48 *
49 * @see getLayoutName()
50 * @return boolean
51 */
52 public function hasLayout();
53
54 /**
55 * If the template contains constructs which prevent the compiler from compiling the template
56 * correctly, isCompilable() will return FALSE.
57 *
58 * @return boolean TRUE if the template can be compiled
59 */
60 public function isCompilable();
61
62 /**
63 * @return boolean TRUE if the template is already compiled, FALSE otherwise
64 */
65 public function isCompiled();
66 }
67
68 ?>