ExportItemToCsvFileUtil Class Reference

Inheritance diagram for ExportItemToCsvFileUtil:
ExportItemToOutputUtil

Static Public Member Functions

static export ($data, $headerData=array(), $exportFileName= 'exports.csv', $download=false, $allowHeaderOnlyConversion=false, $shouldTrim=false)

Data Fields

const DEFAULT_DELIMITER = ','
const DEFAULT_ENCLOSURE = '"'

Static Protected Member Functions

static arrayToCsv ($row, $isHeaderRow=false, $delimiter=null, $enclosure=null)

Detailed Description

Definition at line 37 of file ExportItemToCsvFileUtil.php.


Member Function Documentation

static export ( data,
headerData = array(),
exportFileName = 'exports.csv',
download = false,
allowHeaderOnlyConversion = false,
shouldTrim = false 
) [static]

Export data array into csv format and send generated file to web browser or return csv string, depending on $download parameter.

Parameters:
array $data
array $headerData
string $exportFileName
bool $download Should send generated csv string to output or not.
bool $allowHeaderOnlyConversion
bool $shouldTrim Should trim data before exporting
Returns:
string|void

Definition at line 54 of file ExportItemToCsvFileUtil.php.

static arrayToCsv ( row,
isHeaderRow = false,
delimiter = null,
enclosure = null 
) [static, protected]

Convert array into csv string.

Parameters:
array $row
boolean $isHeaderRow
string $delimiter
string $enclosure
Returns:
string

Definition at line 97 of file ExportItemToCsvFileUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Dec 15 07:10:25 2017