|
const | HEADER_ROW_OFFSET = 1 |
|
|
| getResultText (SMWQueryResult $queryResult, $outputMode) |
|
| getResultFileContents (SMWQueryResult $queryResult) |
|
| createSpreadsheet () |
|
| populateWorksheet (Worksheet $worksheet, SMWQueryResult $queryResult) |
|
| populateHeaderRow (Row $row, SMWQueryResult $queryResult) |
|
| populateRow (Row $row, $resultRow) |
|
| populateCell (Cell $cell, SMWResultArray $field) |
|
| populateCellAccordingToType (Cell $cell, SMWDataValue $value) |
|
| setQuantityDataValue (Cell $cell, \SMWQuantityValue $value) |
|
| setNumberDataValue (Cell $cell, \SMWNumberValue $value) |
|
| setTimeDataValue (Cell $cell, \SMWTimeValue $value) |
|
| setStringDataValue (Cell $cell, SMWDataValue $value) |
|
| getStringFromSpreadsheet (Spreadsheet $spreadsheet) |
|
|
| $fileFormats |
|
| $styled = false |
|
| $fileFormat |
|
◆ createSpreadsheet()
SRF\SpreadsheetPrinter::createSpreadsheet |
( |
| ) |
|
|
protected |
Creates a new PhpSpreadsheet document and returns it
- Returns
- Spreadsheet
- Exceptions
-
◆ getFileName()
SRF\SpreadsheetPrinter::getFileName |
( |
SMWQueryResult |
$queryResult | ) |
|
◆ getMimeType()
SRF\SpreadsheetPrinter::getMimeType |
( |
SMWQueryResult |
$queryResult | ) |
|
◆ getParamDefinitions()
SRF\SpreadsheetPrinter::getParamDefinitions |
( |
array |
$definitions | ) |
|
◆ getResultFileContents()
SRF\SpreadsheetPrinter::getResultFileContents |
( |
SMWQueryResult |
$queryResult | ) |
|
|
protected |
- Parameters
-
SMWQueryResult | $queryResult | |
- Returns
- string
- Exceptions
-
◆ getResultText()
SRF\SpreadsheetPrinter::getResultText |
( |
SMWQueryResult |
$queryResult, |
|
|
|
$outputMode |
|
) |
| |
|
protected |
Return serialised results in specified format.
- Exceptions
-
◆ getStringFromSpreadsheet()
SRF\SpreadsheetPrinter::getStringFromSpreadsheet |
( |
Spreadsheet |
$spreadsheet | ) |
|
|
protected |
- Parameters
-
- Returns
- string
- Exceptions
-
◆ outputAsFile()
SRF\SpreadsheetPrinter::outputAsFile |
( |
SMWQueryResult |
$queryResult, |
|
|
array |
$params |
|
) |
| |
◆ populateCell()
SRF\SpreadsheetPrinter::populateCell |
( |
Cell |
$cell, |
|
|
SMWResultArray |
$field |
|
) |
| |
|
protected |
- Parameters
-
Cell | $cell | |
SMWResultArray | $field | |
- Exceptions
-
◆ populateCellAccordingToType()
SRF\SpreadsheetPrinter::populateCellAccordingToType |
( |
Cell |
$cell, |
|
|
SMWDataValue |
$value |
|
) |
| |
|
protected |
Checks the type of the value, and set's it in the sheet accordingly
- Parameters
-
- Exceptions
-
◆ populateHeaderRow()
SRF\SpreadsheetPrinter::populateHeaderRow |
( |
Row |
$row, |
|
|
SMWQueryResult |
$queryResult |
|
) |
| |
|
protected |
Populates the PhpSpreadsheet sheet with the headers from the result query
- Parameters
-
Row | $row | |
SMWQueryResult | $queryResult | The query result |
- Returns
- Row
- Exceptions
-
◆ populateRow()
SRF\SpreadsheetPrinter::populateRow |
( |
Row |
$row, |
|
|
|
$resultRow |
|
) |
| |
|
protected |
Populates the PhpSpreadsheet document with the query data
- Parameters
-
- Exceptions
-
◆ populateWorksheet()
SRF\SpreadsheetPrinter::populateWorksheet |
( |
Worksheet |
$worksheet, |
|
|
SMWQueryResult |
$queryResult |
|
) |
| |
|
protected |
- Parameters
-
SMWQueryResult | $queryResult | |
| $worksheet | |
- Exceptions
-
◆ setNumberDataValue()
SRF\SpreadsheetPrinter::setNumberDataValue |
( |
Cell |
$cell, |
|
|
\SMWNumberValue |
$value |
|
) |
| |
|
protected |
Sets a numeric value at the given col,row location
- Parameters
-
Cell | $cell | |
\SMWNumberValue | $value | SMWDataValue the raw data value object |
- Exceptions
-
◆ setQuantityDataValue()
SRF\SpreadsheetPrinter::setQuantityDataValue |
( |
Cell |
$cell, |
|
|
\SMWQuantityValue |
$value |
|
) |
| |
|
protected |
Sets a quantity value at the given col,row location
- Parameters
-
Cell | $cell | |
\SMWQuantityValue | $value | SMWDataValue the raw data value object |
- Exceptions
-
◆ setStringDataValue()
SRF\SpreadsheetPrinter::setStringDataValue |
( |
Cell |
$cell, |
|
|
SMWDataValue |
$value |
|
) |
| |
|
protected |
Sets or appends a string value at the given col,row location
If there already exists a value at a given col,row location, then convert the cell to a string and append the data value. Creating a list of comma separated entries.
- Parameters
-
- Exceptions
-
◆ setTimeDataValue()
SRF\SpreadsheetPrinter::setTimeDataValue |
( |
Cell |
$cell, |
|
|
\SMWTimeValue |
$value |
|
) |
| |
|
protected |
Sets a date/time value at the given col,row location
- Parameters
-
Cell | $cell | |
\SMWTimeValue | $value | the raw data value object |
- Exceptions
-
◆ $fileFormats
SRF\SpreadsheetPrinter::$fileFormats |
|
protected |
Initial value:= [
'xlsx' => [
'writer' => 'Xlsx'
The documentation for this class was generated from the following file: