1 | <?php |
||
12 | class TemplateHelper |
||
13 | { |
||
14 | /** @var \Twig_Environment */ |
||
15 | private $twig; |
||
16 | /** @var Filesystem */ |
||
17 | private $fileSystem; |
||
18 | /** @var string */ |
||
19 | private static $templateBasePath = null; |
||
20 | |||
21 | /** |
||
22 | * @param \Twig_Environment $twig |
||
23 | * @param array $varList |
||
24 | */ |
||
25 | public function __construct(\Twig_Environment $twig, array $varList) |
||
32 | |||
33 | /** |
||
34 | * @param string $template |
||
35 | * @param string $outputFilePath |
||
36 | */ |
||
37 | public function dumpTemplate($template, $outputFilePath) |
||
44 | |||
45 | public static function getTemplateBasePath() |
||
52 | |||
53 | /** |
||
54 | * @param array $varList |
||
55 | * |
||
56 | * @throws \Twig_Error_Loader |
||
57 | */ |
||
58 | private function initTwig(array $varList) |
||
84 | |||
85 | /** |
||
86 | * @param string $varName |
||
87 | * @param string $varValue |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | protected function resolveVar($varName, $varValue) |
||
101 | } |
||
102 |