Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class PdfExportService extends ExportService implements FromHtml |
||
12 | { |
||
13 | /** |
||
14 | * Provide a view to build the PDF from. |
||
15 | * |
||
16 | * @param View $view |
||
17 | * @return PdfRenderer |
||
18 | */ |
||
19 | public static function fromView(View $view): PdfRenderer |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * Provide a view to build the PDF from. |
||
26 | * |
||
27 | * @param ViewModel $viewModel |
||
28 | * @return PdfRenderer |
||
29 | */ |
||
30 | public static function fromViewModel(ViewModel $viewModel): PdfRenderer |
||
31 | { |
||
32 | return new PdfRenderer($viewModel->renderNoCache()); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Provide an HTML string to build the PDF from. |
||
37 | * |
||
38 | * @param string $html |
||
39 | * @return PdfRenderer |
||
40 | */ |
||
41 | public static function fromHtml(string $html): PdfRenderer |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Provide an HTML path or URL to build the PDF from. |
||
48 | * |
||
49 | * @param string $path |
||
50 | * @return PdfRenderer |
||
51 | */ |
||
52 | public static function fromHtmlFile(string $path): PdfRenderer |
||
57 |