| Total Complexity | 4 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class PdfExportService extends AbstractService |
||
| 11 | { |
||
| 12 | // todo: add ability to pass urls to export |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Provide a view to build the PDF from. |
||
| 16 | * |
||
| 17 | * @param View $view |
||
| 18 | * @return PdfExporter |
||
| 19 | * @throws Exception |
||
| 20 | */ |
||
| 21 | public static function fromView(View $view): PdfExporter |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Create a view to build the PDF from. |
||
| 28 | * |
||
| 29 | * @param string $viewName |
||
| 30 | * @param array $viewData |
||
| 31 | * @return PdfExporter |
||
| 32 | * @throws Exception |
||
| 33 | */ |
||
| 34 | public static function fromViewData(string $viewName, array $viewData = []): PdfExporter |
||
| 35 | { |
||
| 36 | return new PdfExporter(view($viewName, $viewData)); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Provide an HTML string to build the PDF from. |
||
| 41 | * |
||
| 42 | * @param string $html |
||
| 43 | * @return PdfExporter |
||
| 44 | * @throws Exception |
||
| 45 | */ |
||
| 46 | public static function fromHtml(string $html): PdfExporter |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Provide an HTML path to build the PDF from. |
||
| 53 | * |
||
| 54 | * @param string $path |
||
| 55 | * @return PdfExporter |
||
| 56 | * @throws Exception |
||
| 57 | */ |
||
| 58 | public static function fromHtmlPath(string $path): PdfExporter |
||
| 63 |