2 namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
36 foreach ($this->childNodes as $subNode) {
37 if ($output === null) {
38 $output = $subNode->evaluate($renderingContext);
40 if (is_object($output)) {
41 if (!method_exists($output,
'__toString')) {
42 throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(
'Cannot cast object of type "' . get_class($output) .
'" to string.', 1248356140);
44 $output = $output->__toString();
46 $output = (string)$output;
48 $subNodeOutput = $subNode->evaluate($renderingContext);
50 if (is_object($subNodeOutput)) {
51 if (!method_exists($subNodeOutput,
'__toString')) {
52 throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(
'Cannot cast object of type "' . get_class($subNodeOutput) .
'" to string.', 1273753083);
54 $output .= $subNodeOutput->__toString();
56 $output .= (string)$subNodeOutput;
82 $this->childNodes[] = $childNode;