1 | <?php |
||
25 | class Html extends Template |
||
26 | { |
||
27 | /** |
||
28 | * @var string The base (skeleton) page in which all templates will get rendered |
||
29 | */ |
||
30 | private $baseTemplate; |
||
31 | |||
32 | /** |
||
33 | * @var \OpCacheGUI\Presentation\UrlRenderer Instance of an URI renderer |
||
34 | */ |
||
35 | private $url; |
||
36 | |||
37 | /** |
||
38 | * Creates instance |
||
39 | * |
||
40 | * @param string $templateDirectory The directory where all the templates are stored |
||
41 | * @param string $baseTemplate The base (skeleton) page in which all templates |
||
42 | * will get rendered |
||
43 | * @param \OpCacheGUI\I18n\Translator $translator The translation service |
||
44 | * @param \OpCacheGUI\Presentation\UrlRenderer $url Instance of an URI renderer |
||
45 | */ |
||
46 | 3 | public function __construct($templateDirectory, $baseTemplate, Translator $translator, UrlRenderer $url) |
|
53 | |||
54 | /** |
||
55 | * Renders a template |
||
56 | * |
||
57 | * @param string $template The template to render |
||
58 | * @param array $data The data to use in the template |
||
59 | */ |
||
60 | 1 | public function render($template, array $data = []) |
|
68 | |||
69 | /** |
||
70 | * Renders the template file using output buffering |
||
71 | * |
||
72 | * @param string $template The template to render |
||
73 | * |
||
74 | * @return string The rendered template |
||
75 | */ |
||
76 | 1 | private function renderTemplate($template) |
|
85 | } |
||
86 |