1 | <?php |
||
9 | class ViewFactory extends BaseViewFactory |
||
10 | { |
||
11 | /** |
||
12 | * @var string $fileExtension The file extension to use when looking for views. |
||
13 | */ |
||
14 | protected $fileExtension = 'mustache'; |
||
15 | |||
16 | |||
17 | /** |
||
18 | * @param string|null $cacheDir A directory to cache rendered templates into (enables caching). |
||
19 | * @param string|null $partialsDir A directory where static partials are stored. |
||
20 | */ |
||
21 | public function __construct($cacheDir = null, $partialsDir = null) |
||
22 | { |
||
23 | $this->cacheDir = $cacheDir; |
||
24 | $this->partialsDir = $partialsDir; |
||
25 | } |
||
26 | |||
27 | |||
28 | /** |
||
29 | * @param string $fileName The name of the file to load. |
||
30 | * @return ViewInterface A view. |
||
31 | */ |
||
32 | public function get($fileName) |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Return a mustache raw template. |
||
40 | * |
||
41 | * @param string $fileName The name of the file to load. |
||
42 | * @return string The unrendered template (raw). |
||
43 | * @throws \Exception |
||
44 | */ |
||
45 | public function getUnrendered($fileName) |
||
49 | } |
||
50 |