PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.5.2
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.5.2
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
fluent-cart / vendor / openspout / openspout / src / Writer / Common / Manager / WorkbookManagerInterface.php

WorkbookManagerInterface.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.5.2, at vendor/openspout/openspout/src/Writer/Common/Manager/WorkbookManagerInterface.php

86 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\OpenSpout\Writer\Common\Manager;
4
5 use FluentCart\OpenSpout\Common\Entity\Row;
6 use FluentCart\OpenSpout\Common\Exception\IOException;
7 use FluentCart\OpenSpout\Writer\Common\Entity\Sheet;
8 use FluentCart\OpenSpout\Writer\Common\Entity\Workbook;
9 use FluentCart\OpenSpout\Writer\Common\Entity\Worksheet;
10 use FluentCart\OpenSpout\Writer\Exception\SheetNotFoundException;
11 use FluentCart\OpenSpout\Writer\Exception\WriterException;
12 /**
13 * Interface WorkbookManagerInterface
14 * workbook manager interface, providing the generic interfaces to work with workbook.
15 */
16 interface WorkbookManagerInterface
17 {
18 /**
19 * @return null|Workbook
20 */
21 public function getWorkbook();
22 /**
23 * Creates a new sheet in the workbook and make it the current sheet.
24 * The writing will resume where it stopped (i.e. data won't be truncated).
25 *
26 * @throws IOException If unable to open the sheet for writing
27 *
28 * @return Worksheet The created sheet
29 */
30 public function addNewSheetAndMakeItCurrent();
31 /**
32 * @return Worksheet[] All the workbook's sheets
33 */
34 public function getWorksheets();
35 /**
36 * Returns the current sheet.
37 *
38 * @return Worksheet The current sheet
39 */
40 public function getCurrentWorksheet();
41 /**
42 * Starts the current sheet and opens its file pointer.
43 */
44 public function startCurrentSheet();
45 public function setDefaultColumnWidth(float $width);
46 public function setDefaultRowHeight(float $height);
47 /**
48 * @param int ...$columns One or more columns with this width
49 */
50 public function setColumnWidth(float $width, ...$columns);
51 /**
52 * @param float $width The width to set
53 * @param int $start First column index of the range
54 * @param int $end Last column index of the range
55 */
56 public function setColumnWidthForRange(float $width, int $start, int $end);
57 /**
58 * Sets the given sheet as the current one. New data will be written to this sheet.
59 * The writing will resume where it stopped (i.e. data won't be truncated).
60 *
61 * @param Sheet $sheet The "external" sheet to set as current
62 *
63 * @throws SheetNotFoundException If the given sheet does not exist in the workbook
64 */
65 public function setCurrentSheet(Sheet $sheet);
66 /**
67 * Adds a row to the current sheet.
68 * If shouldCreateNewSheetsAutomatically option is set to true, it will handle pagination
69 * with the creation of new worksheets if one worksheet has reached its maximum capicity.
70 *
71 * @param Row $row The row to be added
72 *
73 * @throws IOException If trying to create a new sheet and unable to open the sheet for writing
74 * @throws WriterException If unable to write data
75 */
76 public function addRowToCurrentWorksheet(Row $row);
77 /**
78 * Closes the workbook and all its associated sheets.
79 * All the necessary files are written to disk and zipped together to create the final file.
80 * All the temporary files are then deleted.
81 *
82 * @param resource $finalFilePointer Pointer to the spreadsheet that will be created
83 */
84 public function close($finalFilePointer);
85 }
86