[TASK] Sync CMS Fluid with Flow Fluid 1.1 (part1)
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / Core / Parser / SyntaxTree / NodeInterface.php
1 <?php
2 namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
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 * Node in the syntax tree.
16 */
17 interface NodeInterface {
18
19 /**
20 * Evaluate all child nodes and return the evaluated results.
21 *
22 * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
23 * @return mixed Normally, an object is returned - in case it is concatenated with a string, a string is returned.
24 */
25 public function evaluateChildNodes(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
26
27 /**
28 * Returns all child nodes for a given node.
29 *
30 * @return array<\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface> A list of nodes
31 */
32 public function getChildNodes();
33
34 /**
35 * Appends a subnode to this node. Is used inside the parser to append children
36 *
37 * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode The subnode to add
38 * @return void
39 */
40 public function addChildNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode);
41
42 /**
43 * Evaluates the node - can return not only strings, but arbitary objects.
44 *
45 * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
46 * @return mixed Evaluated node
47 */
48 public function evaluate(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
49 }
50
51 ?>