129a7959838564ae492bdcd35078fb8ead60842a
[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 * This interface is returned by Tx_Fluid_Core_Parser_TemplateParser->parse()
15 * method and is a parsed template
16 */
17 interface ParsedTemplateInterface {
18
19 /**
20 * Render the parsed template with rendering context
21 *
22 * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext The rendering context to use
23 * @return string Rendered string
24 */
25 public function render(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
26
27 /**
28 * Returns a variable container used in the PostParse Facet.
29 * TODO: remove
30 *
31 * @return \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer
32 */
33 public function getVariableContainer();
34
35 /**
36 * Returns the name of the layout that is defined within the current template via <f:layout name="..." />
37 * If no layout is defined, this returns NULL
38 * This requires the current rendering context in order to be able to evaluate the layout name
39 *
40 * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
41 * @return string
42 */
43 public function getLayoutName(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
44
45 /**
46 * Returns TRUE if the current template has a template defined via <f:layout name="..." />
47 *
48 * @see getLayoutName()
49 * @return boolean
50 */
51 public function hasLayout();
52
53 /**
54 * If the template contains constructs which prevent the compiler from compiling the template
55 * correctly, isCompilable() will return FALSE.
56 *
57 * @return boolean TRUE if the template can be compiled
58 */
59 public function isCompilable();
60
61 /**
62 * @return boolean TRUE if the template is already compiled, FALSE otherwise
63 */
64 public function isCompiled();
65 }
66
67 ?>