PHP Class Box\Spout\Writer\ODS\Writer

Inheritance: extends Box\Spout\Writer\AbstractMultiSheetsWriter
Datei anzeigen Open project: box/spout Class Usage Examples

Protected Properties

Property Type Description
$book The workbook for the ODS file
$headerContentType Content-Type value for the header
$tempFolder Temporary folder where the files to create the ODS will be stored

Public Methods

Method Description
setTempFolder ( string $tempFolder ) : Writer Sets a custom temporary folder for creating intermediate files/folders.

Protected Methods

Method Description
addRowToWriter ( array $dataRow, Style $style ) : void Adds data to the currently opened writer.
closeWriter ( ) : void Closes the writer, preventing any additional writing.
getWorkbook ( ) : Box\Spout\Writer\ODS\Internal\Workbook
openWriter ( ) : void Configures the write and sets the current sheet pointer to a new sheet.

Method Details

addRowToWriter() protected method

If shouldCreateNewSheetsAutomatically option is set to true, it will handle pagination with the creation of new worksheets if one worksheet has reached its maximum capicity.
protected addRowToWriter ( array $dataRow, Style $style ) : void
$dataRow array Array containing data to be written. Example $dataRow = ['data1', 1234, null, '', 'data5'];
$style Box\Spout\Writer\Style\Style Style to be applied to the row.
return void

closeWriter() protected method

Closes the writer, preventing any additional writing.
protected closeWriter ( ) : void
return void

getWorkbook() protected method

protected getWorkbook ( ) : Box\Spout\Writer\ODS\Internal\Workbook
return Box\Spout\Writer\ODS\Internal\Workbook The workbook representing the file to be written

openWriter() protected method

Configures the write and sets the current sheet pointer to a new sheet.
protected openWriter ( ) : void
return void

setTempFolder() public method

This must be set before opening the writer.
public setTempFolder ( string $tempFolder ) : Writer
$tempFolder string Temporary folder where the files to create the ODS will be stored
return Writer

Property Details

$book protected_oe property

The workbook for the ODS file
protected $book

$headerContentType protected_oe static_oe property

Content-Type value for the header
protected static $headerContentType

$tempFolder protected_oe property

Temporary folder where the files to create the ODS will be stored
protected $tempFolder