Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
26
vendor/doctrine/rst-parser/lib/Templates/TwigTemplateRenderer.php
vendored
Normal file
26
vendor/doctrine/rst-parser/lib/Templates/TwigTemplateRenderer.php
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\RST\Templates;
|
||||
|
||||
use Doctrine\RST\Configuration;
|
||||
|
||||
use function rtrim;
|
||||
|
||||
final class TwigTemplateRenderer implements TemplateRenderer
|
||||
{
|
||||
/** @var Configuration */
|
||||
private $configuration;
|
||||
|
||||
public function __construct(Configuration $configuration)
|
||||
{
|
||||
$this->configuration = $configuration;
|
||||
}
|
||||
|
||||
/** @param mixed[] $parameters */
|
||||
public function render(string $template, array $parameters = []): string
|
||||
{
|
||||
return rtrim($this->configuration->getTemplateEngine()->render($template, $parameters), "\n");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue