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 = []) |
||
44 | |||
45 | /** |
||
46 | * @param string $templateFilePath |
||
47 | * @param string $outputFilePath |
||
48 | * |
||
49 | * @throws TargetFileExistsException |
||
50 | */ |
||
51 | public function dumpTemplate($templateFilePath, $outputFilePath) |
||
55 | |||
56 | /** |
||
57 | * @param string $templateFilePath |
||
58 | * @param string $outputDir |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | public function resolveOutputFilePath($templateFilePath, $outputDir) |
||
70 | |||
71 | /** |
||
72 | * @param string $templateFilePath |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | public function resolveOutputFilename($templateFilePath) |
||
80 | |||
81 | /** |
||
82 | * @param string $templateFilePath |
||
83 | * |
||
84 | * @return string file content |
||
85 | */ |
||
86 | public function loadTemplate($templateFilePath) |
||
90 | } |
||
91 |