| 1 | <?php |
||
| 11 | class Twig extends Template |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var Twig_Environment |
||
| 15 | */ |
||
| 16 | private $environment; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param Filesystem $filesystem |
||
| 20 | */ |
||
| 21 | 4 | public function __construct(Filesystem $filesystem) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $source |
||
| 29 | * @param array $variables |
||
| 30 | * @return string |
||
| 31 | * @throws RenderFailedException |
||
| 32 | */ |
||
| 33 | 3 | public function renderSource(string $source, array $variables): string |
|
| 41 | |||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $templateName |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | 2 | protected function fileName(string $templateName): string |
|
| 51 | } |
||
| 52 |