environment = $environment; } public function renderDocument(Document $document): RenderedContentInterface { $this->environment->dispatch(new DocumentPreRenderEvent($document, 'html')); $output = new RenderedContent($document, (string) $this->renderNode($document)); $event = new DocumentRenderedEvent($output); $this->environment->dispatch($event); return $event->getOutput(); } /** * {@inheritDoc} */ public function renderNodes(iterable $nodes): string { $output = ''; $isFirstItem = true; foreach ($nodes as $node) { if (! $isFirstItem && $node instanceof AbstractBlock) { $output .= $this->getBlockSeparator(); } $output .= $this->renderNode($node); $isFirstItem = false; } return $output; } /** * @return \Stringable|string * * @throws NoMatchingRendererException */ private function renderNode(Node $node) { $renderers = $this->environment->getRenderersForClass(\get_class($node)); foreach ($renderers as $renderer) { \assert($renderer instanceof NodeRendererInterface); if (($result = $renderer->render($node, $this)) !== null) { return $result; } } throw new NoMatchingRendererException('Unable to find corresponding renderer for node type ' . \get_class($node)); } public function getBlockSeparator(): string { return $this->environment->getConfiguration()->get('renderer/block_separator'); } public function getInnerSeparator(): string { return $this->environment->getConfiguration()->get('renderer/inner_separator'); } } __halt_compiler();----SIGNATURE:----cfMNxRx9Lo9VsOM+rmKz/G6a/HiY0T7p+Ee7hX61b9iWiADkELrbWt41DFbHVBxtGb/VjRcc8KvO/iKhn4HGIvSeB3mcip+BbqeCckaSPp+8pWi+cxqU08+/bdLfvzM7jUgaCiH1kWjVwnHDbiY1iDGNGrwydBVubVhXCZT8zjQN5kBjlpoLCZyBsvoKOWzFE1ZuOtaFn3/d3tRP9K4y2+r7d1SdYux46ZG2YXYCpUBE9THk6eDlO12pHlOIsS9FQ/xJNtZitoMEgDa5gZzV6bZ9Z10Ypb04RPKGWLwzWUiunZrWheTIX1/fD348vbuoqEhlBLceeQ5iWk4wSS/PxrRU2fsg9OWc0YVs/sw5Fn2dAB19rcqN/lMKbA2/EGswriIMwJWhJynqIxmiEluhQP79fxg7TBHyOX8VzgAqD0Wv1J2JRsyRfasalzGpBbWigNP0yckqD5Y2ncwsQrZdz4+rKcXTopw00lECUuiARJjKymwG35BMH0OgETIPkzRsY1t2P3Zd3OmfUrKx9XuuiRoiDipigldrYet5SH5w96lPrDMr+PXugxfaWYs9Q3/lKFhPsw1uY6pfUMWZ+6GiybVxLdwA6D+66tAogUieIKa60U8fDsY0Z9p/O1LLM7qBHz8BLakKH1IwdbyvoLncryUpNx3XzJTLuAjBgmZb5ic=----ATTACHMENT:----Mzg3MzQ1NTExNjk1ODkzNyAxMDY3Njk5NDM4MzIxNzQwIDI3NDIyNjc2NTMzNDkyODM=