32 lines
784 B
PHP
32 lines
784 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Doctrine\RST\LaTeX\Renderers;
|
|
|
|
use Doctrine\RST\Nodes\ParagraphNode;
|
|
use Doctrine\RST\Renderers\NodeRenderer;
|
|
use Doctrine\RST\Templates\TemplateRenderer;
|
|
|
|
final class ParagraphNodeRenderer implements NodeRenderer
|
|
{
|
|
/** @var ParagraphNode */
|
|
private $paragraphNode;
|
|
|
|
/** @var TemplateRenderer */
|
|
private $templateRenderer;
|
|
|
|
public function __construct(ParagraphNode $paragraphNode, TemplateRenderer $templateRenderer)
|
|
{
|
|
$this->paragraphNode = $paragraphNode;
|
|
$this->templateRenderer = $templateRenderer;
|
|
}
|
|
|
|
public function render(): string
|
|
{
|
|
return $this->templateRenderer->render('paragraph.tex.twig', [
|
|
'paragraphNode' => $this->paragraphNode,
|
|
]);
|
|
}
|
|
}
|