gl-website-deployer/vendor/doctrine/rst-parser/lib/LaTeX/Renderers/ImageNodeRenderer.php
2024-11-19 08:02:04 +01:00

32 lines
744 B
PHP

<?php
declare(strict_types=1);
namespace Doctrine\RST\LaTeX\Renderers;
use Doctrine\RST\Nodes\ImageNode;
use Doctrine\RST\Renderers\NodeRenderer;
use Doctrine\RST\Templates\TemplateRenderer;
final class ImageNodeRenderer implements NodeRenderer
{
/** @var ImageNode */
private $imageNode;
/** @var TemplateRenderer */
private $templateRenderer;
public function __construct(ImageNode $imageNode, TemplateRenderer $templateRenderer)
{
$this->imageNode = $imageNode;
$this->templateRenderer = $templateRenderer;
}
public function render(): string
{
return $this->templateRenderer->render('image.tex.twig', [
'imageNode' => $this->imageNode,
]);
}
}