| 1 | <?php |
||
| 13 | class ReportGenerator |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var Filesystem |
||
| 18 | */ |
||
| 19 | protected $filesystem; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param Filesystem $filesystem |
||
| 23 | */ |
||
| 24 | public function __construct(Filesystem $filesystem) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param $path |
||
| 31 | * @param array $data |
||
| 32 | */ |
||
| 33 | public function generate($path, array $data) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Sets up the report directory. |
||
| 47 | * |
||
| 48 | * @param string $path |
||
| 49 | * @return $this |
||
| 50 | */ |
||
| 51 | protected function setupDirectory($path) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Renders the Report HTML and returns it |
||
| 61 | * |
||
| 62 | * @param array $data |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | protected function renderReport(array $data) |
||
| 73 | } |
||
| 74 |