1 | <?php |
||
9 | class TemplateHelper |
||
10 | { |
||
11 | /** @var array */ |
||
12 | private $variableList = []; |
||
13 | /** @var string[] */ |
||
14 | private $variableNameList = []; |
||
15 | /** @var string */ |
||
16 | private $filenameResolverRegexp; |
||
17 | /** @var Filesystem */ |
||
18 | private $fs; |
||
19 | |||
20 | /** |
||
21 | * @param array $variableList |
||
22 | * @param array $extraTemplatePath |
||
23 | */ |
||
24 | public function __construct(array $variableList, array $extraTemplatePath = []) |
||
43 | |||
44 | /** |
||
45 | * @param string $templateFilePath |
||
46 | * @param string $outputFilePath |
||
47 | */ |
||
48 | public function dumpTemplate($templateFilePath, $outputFilePath) |
||
52 | |||
53 | /** |
||
54 | * @param string $templateFilePath |
||
55 | * @param string $outputDir |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | public function resolveOutputFilePath($templateFilePath, $outputDir) |
||
67 | |||
68 | /** |
||
69 | * @param string $templateFilePath |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function resolveOutputFilename($templateFilePath) |
||
77 | |||
78 | /** |
||
79 | * @param string $templateFilePath |
||
80 | * |
||
81 | * @return string file content |
||
82 | */ |
||
83 | public function loadTemplate($templateFilePath) |
||
87 | } |
||
88 |