1 | <?php |
||
21 | class ExcelFactory |
||
22 | { |
||
23 | /** |
||
24 | * @var CompatibilityHelper |
||
25 | */ |
||
26 | private $compatibilytyHelper; |
||
27 | |||
28 | 19 | public function __construct() |
|
32 | |||
33 | /** |
||
34 | * Creates an empty Spreadsheet Object if the filename is empty, otherwise loads the file into the object. |
||
35 | * |
||
36 | * @param string $filename |
||
37 | * |
||
38 | * @return Spreadsheet |
||
39 | */ |
||
40 | 11 | public function createSpreadsheet($filename = null) |
|
44 | |||
45 | /** |
||
46 | * Create a worksheet drawing |
||
47 | * @return Drawing |
||
48 | */ |
||
49 | 3 | public function createSpreadsheetWorksheetDrawing() |
|
53 | |||
54 | /** |
||
55 | * Create a reader |
||
56 | * |
||
57 | * @param string $type |
||
58 | * |
||
59 | * @return IReader |
||
60 | */ |
||
61 | 5 | public function createReader($type = 'Xlsx') |
|
75 | |||
76 | /** |
||
77 | * Create a writer given the PHPExcelObject and the type, |
||
78 | * the type could be one of PHPExcel_IOFactory::$_autoResolveClasses |
||
79 | * |
||
80 | * @param Spreadsheet $spreadSheetObject |
||
81 | * @param string $type |
||
82 | * |
||
83 | * @return IWriter |
||
84 | */ |
||
85 | 10 | public function createWriter(Spreadsheet $spreadSheetObject, $type = 'Xlsx') |
|
91 | |||
92 | /** |
||
93 | * Stream the file as Response. |
||
94 | * |
||
95 | * @param IWriter $writer |
||
96 | * @param int $status |
||
97 | * @param array $headers |
||
98 | * |
||
99 | * @return StreamedResponse |
||
100 | */ |
||
101 | 3 | public function createStreamedResponse(IWriter $writer, $status = 200, $headers = array()) |
|
111 | |||
112 | /** |
||
113 | * Create a PHPExcel Helper HTML Object |
||
114 | * |
||
115 | * @return Html |
||
116 | */ |
||
117 | 10 | public function createHelperHTML() |
|
121 | } |
||
122 |