\CsvDataFormatter
CsvDataFormatter extends {@link ExcelDataFormatter} to provide a DataFormatter suitable for exporting an {@link SS_link} of {@link DataObjectInterface} to a CSV spreadsheet.
- Author: Firebrand <hello@firebrand.nz>
- License: MIT
Synopsis
class CsvDataFormatter
extends ExcelDataFormatter
{
- // Inherited members from ExcelDataFormatter
- protected bool $useLabelsAsHeaders;
- // methods
- public void supportedExtensions()
- public void supportedMimeTypes()
- public void convertDataObjectSet()
- // Inherited methods from ExcelDataFormatter
- public void supportedExtensions()
- public void supportedMimeTypes()
- public void convertDataObject()
- public void convertDataObjectSet()
- protected void setHeader()
- protected void getFieldsForObj()
- public PHPExcel getPhpExcelObject()
- protected PHPExcel setupExcel()
- protected PHPExcel_Worksheet headerRow()
- protected PHPExcel_Worksheet addRow()
- protected string getFileData()
- public bool getUseLabelsAsHeaders()
- public ExcelDataFormatter setUseLabelsAsHeaders()
Hierarchy
Extends
Members
protected
- $useLabelsAsHeaders
—
bool
Determined what we will use as headers for the spread sheet.
Methods
public
Inherited from ExcelDataFormatter
protected
- addRow() — Add a new row to a {@link PHPExcel_Worksheet} based of a {@link DataObjectInterface}
- getFieldsForObj()
- getFileData() — Generate a string representation of an {@link PHPExcel} spread sheet suitable for output to the browser.
- headerRow() — Add an header row to a {@link PHPExcel_Worksheet}.
- setHeader() — Set the HTTP Content Type header to the appropriate Mime Type.
- setupExcel() — Initialize a new {@link PHPExcel} object based on the provided {@link DataObjectInterface} interface.
public
- convertDataObject()
- convertDataObjectSet()
- getPhpExcelObject() — Generate a {@link PHPExcel} for the provided DataObject List
- getUseLabelsAsHeaders() — Accessor for UseLabelsAsHeaders. If this is `true`, the data formatter will call {@link DataObject::fieldLabel()} to pick the header strings. If it's set to false, it will use the raw field name.
- setUseLabelsAsHeaders() — Setter for UseLabelsAsHeaders. If this is `true`, the data formatter will call {@link DataObject::fieldLabel()} to pick the header strings. If it's set to false, it will use the raw field name.
- supportedExtensions()
- supportedMimeTypes()