| 1 | <?php |
||
| 12 | class MustacheEngine extends AbstractEngine |
||
| 13 | { |
||
| 14 | private $stringRenderingEngine; |
||
| 15 | private $fileRenderingEngine; |
||
| 16 | |||
| 17 | public function __construct(Mustache_Engine $stringRenderingEngine, Mustache_Engine $fileRenderingEngine) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Passes the data to be rendered to the template engine instance. |
||
| 25 | * @param string $filePath |
||
| 26 | * @param array $data |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public function renderFromFileTemplate(string $filePath, array $data): string |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Passes a template string and data to be rendered to the template engine |
||
| 36 | * instance. |
||
| 37 | * @param string $string |
||
| 38 | * @param array $data |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | public function renderFromStringTemplate(string $string, array $data): string |
||
| 45 | } |
||
| 46 |