add chapter 11 solutions
This commit is contained in:
parent
60a1304387
commit
9fa38083b2
21 changed files with 1975 additions and 0 deletions
17
implementation/11/src/Template/MustacheRenderer.php
Normal file
17
implementation/11/src/Template/MustacheRenderer.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Lubian\NoFramework\Template;
|
||||
|
||||
use Mustache_Engine;
|
||||
|
||||
final class MustacheRenderer implements Renderer
|
||||
{
|
||||
public function __construct(private readonly Mustache_Engine $engine)
|
||||
{
|
||||
}
|
||||
|
||||
public function render(string $template, array $data): string
|
||||
{
|
||||
return $this->engine->render($template, $data);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue