1 | <?php |
||
19 | class HtmlReport implements ReportInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var \Twig_Environment |
||
23 | */ |
||
24 | private $twig; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $template; |
||
30 | |||
31 | /** |
||
32 | * HtmlReport constructor. |
||
33 | * @param string $templatesDir |
||
34 | * @param array $optionTwig |
||
35 | */ |
||
36 | 4 | public function __construct($templatesDir = '', $optionTwig = []) |
|
44 | |||
45 | /** |
||
46 | * Build html report. |
||
47 | * |
||
48 | * @param DocumentInterface $document |
||
49 | * @param array $parameters |
||
50 | * @return mixed |
||
51 | * @throws \Twig_Error_Loader |
||
52 | * @throws \Twig_Error_Runtime |
||
53 | * @throws \Twig_Error_Syntax |
||
54 | */ |
||
55 | 4 | public function render(DocumentInterface $document, $parameters = []) |
|
64 | |||
65 | /** |
||
66 | * Set filename templte. |
||
67 | * |
||
68 | * @param string $template |
||
69 | */ |
||
70 | 4 | public function setTemplate($template) |
|
74 | |||
75 | /** |
||
76 | * @param $directory |
||
77 | * @param $options |
||
78 | * @return \Twig_Environment |
||
79 | */ |
||
80 | 4 | private function getTwig($directory, $options) |
|
89 | } |