45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Box\Spout\Writer\Common\Manager;
|
|
|
|
use Box\Spout\Writer\Common\Entity\Worksheet;
|
|
use Box\Spout\Writer\Common\Entity\Style\Style;
|
|
|
|
/**
|
|
* Interface WorksheetManagerInterface
|
|
* Inteface for worksheet managers, providing the generic interfaces to work with worksheets.
|
|
*
|
|
* @package Box\Spout\Writer\Common\Manager
|
|
*/
|
|
interface WorksheetManagerInterface
|
|
{
|
|
/**
|
|
* Adds data to the worksheet.
|
|
*
|
|
* @param Worksheet $worksheet The worksheet to add the row to
|
|
* @param array $dataRow Array containing data to be written. Cannot be empty.
|
|
* Example $dataRow = ['data1', 1234, null, '', 'data5'];
|
|
* @param Style $rowStyle Style to be applied to the row. NULL means use default style.
|
|
* @return void
|
|
* @throws \Box\Spout\Common\Exception\IOException If the data cannot be written
|
|
* @throws \Box\Spout\Common\Exception\InvalidArgumentException If a cell value's type is not supported
|
|
*/
|
|
public function addRow(Worksheet $worksheet, $dataRow, $rowStyle);
|
|
|
|
/**
|
|
* Prepares the worksheet to accept data
|
|
*
|
|
* @param Worksheet $worksheet The worksheet to start
|
|
* @return void
|
|
* @throws \Box\Spout\Common\Exception\IOException If the sheet data file cannot be opened for writing
|
|
*/
|
|
public function startSheet(Worksheet $worksheet);
|
|
|
|
/**
|
|
* Closes the worksheet
|
|
*
|
|
* @param Worksheet $worksheet
|
|
* @return void
|
|
*/
|
|
public function close(Worksheet $worksheet);
|
|
} |