PHP Класс Box\Spout\Writer\ODS\Internal\Worksheet

Наследование: implements Box\Spout\Writer\Common\Internal\WorksheetInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$externalSheet The "external" sheet
$lastWrittenRowIndex Index of the last written row
$maxNumColumns Maximum number of columns among all the written rows
$sheetFilePointer Pointer to the temporary sheet data file (e.g. worksheets-temp/sheet1.xml)
$stringHelper To help with string manipulation
$stringsEscaper Strings escaper
$worksheetFilePath Path to the XML file that will contain the sheet data

Открытые методы

Метод Описание
__construct ( Sheet $externalSheet, string $worksheetFilesFolder )
addRow ( array $dataRow, Style $style ) : void Adds data to the worksheet.
close ( ) : void Closes the worksheet
getExternalSheet ( ) : Sheet
getLastWrittenRowIndex ( ) : integer
getTableElementStartAsString ( ) : string Returns the table XML root node as string.
getWorksheetFilePath ( ) : string

Защищенные методы

Метод Описание
getCellXML ( mixed $cellValue, integer $styleIndex, integer $numTimesValueRepeated ) : string Returns the cell XML content, given its value.
startSheet ( ) : void Prepares the worksheet to accept data The XML file does not contain the "" node as it contains the sheet's name which may change during the execution of the program. It will be added at the end.
throwIfSheetFilePointerIsNotAvailable ( ) : void Checks if the book has been created. Throws an exception if not created yet.

Описание методов

__construct() публичный Метод

public __construct ( Sheet $externalSheet, string $worksheetFilesFolder )
$externalSheet Box\Spout\Writer\Common\Sheet The associated "external" sheet
$worksheetFilesFolder string Temporary folder where the files to create the ODS will be stored

addRow() публичный Метод

Adds data to the worksheet.
public addRow ( array $dataRow, Style $style ) : void
$dataRow array Array containing data to be written. Cannot be empty. Example $dataRow = ['data1', 1234, null, '', 'data5'];
$style Box\Spout\Writer\Style\Style Style to be applied to the row. NULL means use default style.
Результат void

close() публичный Метод

Closes the worksheet
public close ( ) : void
Результат void

getCellXML() защищенный Метод

Returns the cell XML content, given its value.
protected getCellXML ( mixed $cellValue, integer $styleIndex, integer $numTimesValueRepeated ) : string
$cellValue mixed The value to be written
$styleIndex integer Index of the used style
$numTimesValueRepeated integer Number of times the value is consecutively repeated
Результат string The cell XML content

getExternalSheet() публичный Метод

public getExternalSheet ( ) : Sheet
Результат Box\Spout\Writer\Common\Sheet The "external" sheet

getLastWrittenRowIndex() публичный Метод

public getLastWrittenRowIndex ( ) : integer
Результат integer The index of the last written row

getTableElementStartAsString() публичный Метод

Returns the table XML root node as string.
public getTableElementStartAsString ( ) : string
Результат string node as string

getWorksheetFilePath() публичный Метод

public getWorksheetFilePath ( ) : string
Результат string Path to the temporary sheet content XML file

startSheet() защищенный Метод

Prepares the worksheet to accept data The XML file does not contain the "" node as it contains the sheet's name which may change during the execution of the program. It will be added at the end.
protected startSheet ( ) : void
Результат void

throwIfSheetFilePointerIsNotAvailable() защищенный Метод

Checks if the book has been created. Throws an exception if not created yet.
protected throwIfSheetFilePointerIsNotAvailable ( ) : void
Результат void

Описание свойств

$externalSheet защищенное свойство

The "external" sheet
protected $externalSheet

$lastWrittenRowIndex защищенное свойство

Index of the last written row
protected $lastWrittenRowIndex

$maxNumColumns защищенное свойство

Maximum number of columns among all the written rows
protected $maxNumColumns

$sheetFilePointer защищенное свойство

Pointer to the temporary sheet data file (e.g. worksheets-temp/sheet1.xml)
protected $sheetFilePointer

$stringHelper защищенное свойство

To help with string manipulation
protected $stringHelper

$stringsEscaper защищенное свойство

Strings escaper
protected $stringsEscaper

$worksheetFilePath защищенное свойство

Path to the XML file that will contain the sheet data
protected $worksheetFilePath