1 | <?php |
||
10 | class TemplateHelper |
||
11 | { |
||
12 | /** @var array */ |
||
13 | private $variableList = []; |
||
14 | /** @var string[] */ |
||
15 | private $variableNameList = []; |
||
16 | /** @var string */ |
||
17 | private $filenameResolverRegexp; |
||
18 | /** @var Filesystem */ |
||
19 | private $fs; |
||
20 | |||
21 | /** |
||
22 | * @param array $variableList |
||
23 | * @param array $extraTemplatePath |
||
24 | */ |
||
25 | public function __construct(array $variableList, array $extraTemplatePath = []) |
||
50 | |||
51 | /** |
||
52 | * @param string $templateFilePath |
||
53 | * @param string $outputFilePath |
||
54 | * |
||
55 | * @throws TargetFileExistsException |
||
56 | */ |
||
57 | public function dumpTemplate($templateFilePath, $outputFilePath) |
||
61 | |||
62 | /** |
||
63 | * @param string $templateFilePath |
||
64 | * @param string $outputDir |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function resolveOutputFilePath($templateFilePath, $outputDir) |
||
76 | |||
77 | /** |
||
78 | * @param string $templateFilePath |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | public function resolveOutputFilename($templateFilePath) |
||
86 | |||
87 | /** |
||
88 | * @param string $templateFilePath |
||
89 | * |
||
90 | * @return string file content |
||
91 | */ |
||
92 | public function loadTemplate($templateFilePath) |
||
96 | } |
||
97 |