1 | <?php declare(strict_types=1); |
||
32 | class TwigTemplates implements TemplatesInterface, TemplatesCacheInterface |
||
33 | { |
||
34 | /** |
||
35 | * @var Environment |
||
36 | */ |
||
37 | private $twig; |
||
38 | |||
39 | /** |
||
40 | * @param string $appRootFolder |
||
41 | * @param string $templatesFolder |
||
42 | * @param null|string $cacheFolder |
||
43 | * @param bool $isDebug |
||
44 | * @param bool $isAutoReload |
||
45 | */ |
||
46 | 5 | public function __construct( |
|
62 | |||
63 | /** |
||
64 | * @return Environment |
||
65 | */ |
||
66 | 1 | public function getTwig(): Environment |
|
70 | |||
71 | /** |
||
72 | * @param string $name |
||
73 | * @param array $context |
||
74 | * |
||
75 | * @return string |
||
76 | * |
||
77 | * @throws LoaderError |
||
78 | * @throws SyntaxError |
||
79 | * @throws RuntimeError |
||
80 | */ |
||
81 | 1 | public function render(string $name, array $context = []): string |
|
85 | |||
86 | /** |
||
87 | * @param string $name |
||
88 | * |
||
89 | * @throws LoaderError |
||
90 | * @throws SyntaxError |
||
91 | */ |
||
92 | 1 | public function cache(string $name): void |
|
96 | } |
||
97 |