1 | <?php |
||
12 | class Liquid extends Template |
||
13 | { |
||
14 | /** |
||
15 | * @var LiquidTemplate |
||
16 | */ |
||
17 | private $liquid; |
||
18 | |||
19 | /** |
||
20 | * @param Filesystem $filesystem |
||
21 | */ |
||
22 | 4 | public function __construct(Filesystem $filesystem = null) |
|
23 | { |
||
24 | 4 | parent::__construct($filesystem); |
|
25 | 4 | if (!is_null($filesystem) && $filesystem->getAdapter() instanceof Local) { |
|
26 | $path = $filesystem->getAdapter()->getPathPrefix(); |
||
27 | } else { |
||
28 | 4 | $path = null; |
|
29 | } |
||
30 | 4 | $this->liquid = new LiquidTemplate($path); |
|
31 | 4 | } |
|
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | 3 | public function renderSource(string $source, array $variables): string |
|
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | 2 | protected function fileName(string $templateName): string |
|
52 | } |
||
53 |