[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 namespace Box\Spout\Writer\Common\Internal; 4 5 /** 6 * Interface WorkbookInterface 7 * 8 * @package Box\Spout\Writer\Common\Internal 9 */ 10 interface WorkbookInterface 11 { 12 /** 13 * Creates a new sheet in the workbook. The current sheet remains unchanged. 14 * 15 * @return WorksheetInterface The created sheet 16 * @throws \Box\Spout\Common\Exception\IOException If unable to open the sheet for writing 17 */ 18 public function addNewSheet(); 19 20 /** 21 * Creates a new sheet in the workbook and make it the current sheet. 22 * The writing will resume where it stopped (i.e. data won't be truncated). 23 * 24 * @return WorksheetInterface The created sheet 25 * @throws \Box\Spout\Common\Exception\IOException If unable to open the sheet for writing 26 */ 27 public function addNewSheetAndMakeItCurrent(); 28 29 /** 30 * @return WorksheetInterface[] All the workbook's sheets 31 */ 32 public function getWorksheets(); 33 34 /** 35 * Returns the current sheet 36 * 37 * @return WorksheetInterface The current sheet 38 */ 39 public function getCurrentWorksheet(); 40 41 /** 42 * Sets the given sheet as the current one. New data will be written to this sheet. 43 * The writing will resume where it stopped (i.e. data won't be truncated). 44 * 45 * @param \Box\Spout\Writer\Common\Sheet $sheet The "external" sheet to set as current 46 * @return void 47 * @throws \Box\Spout\Writer\Exception\SheetNotFoundException If the given sheet does not exist in the workbook 48 */ 49 public function setCurrentSheet($sheet); 50 51 /** 52 * Adds data to the current sheet. 53 * If shouldCreateNewSheetsAutomatically option is set to true, it will handle pagination 54 * with the creation of new worksheets if one worksheet has reached its maximum capicity. 55 * 56 * @param array $dataRow Array containing data to be written. 57 * Example $dataRow = ['data1', 1234, null, '', 'data5']; 58 * @param \Box\Spout\Writer\Style\Style $style Style to be applied to the row. 59 * @return void 60 * @throws \Box\Spout\Common\Exception\IOException If trying to create a new sheet and unable to open the sheet for writing 61 * @throws \Box\Spout\Writer\Exception\WriterException If unable to write data 62 */ 63 public function addRowToCurrentWorksheet($dataRow, $style); 64 65 /** 66 * Closes the workbook and all its associated sheets. 67 * All the necessary files are written to disk and zipped together to create the ODS file. 68 * All the temporary files are then deleted. 69 * 70 * @param resource $finalFilePointer Pointer to the ODS that will be created 71 * @return void 72 */ 73 public function close($finalFilePointer); 74 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |