Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 0 |
1 | <?php |
||
13 | class SmartyEngine extends AbstractEngine |
||
14 | { |
||
15 | private $smarty; |
||
16 | |||
17 | 1 | public function __construct(Core $smarty) |
|
18 | { |
||
19 | 1 | $this->smarty = $smarty; |
|
20 | 1 | } |
|
21 | |||
22 | /** |
||
23 | * Passes the data to be rendered to the template engine instance. |
||
24 | * @param string $filePath |
||
25 | * @param array $data |
||
26 | * @return string |
||
27 | * @throws \SmartyException |
||
28 | */ |
||
29 | 1 | public function renderFromFileTemplate(string $filePath, array $data): string |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * Passes a template string and data to be rendered to the template engine |
||
37 | * instance. |
||
38 | * @param string $string |
||
39 | * @param array $data |
||
40 | * @return string |
||
41 | * @throws \SmartyException |
||
42 | */ |
||
43 | public function renderFromStringTemplate(string $string, array $data): string |
||
49 |