\EONConsulting\PHPStencil\src\Factories\Text\AdaptersCSVAdapter

Class CSVAdapter

Summary

Methods
Properties
Constants
output()
arrayToCsv()
download_send_headers()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

output()

output(  $data) 

Output the data in CSV file and download the file

Parameters

$data

arrayToCsv()

arrayToCsv(array  $fields, string  $delimiter = ';', string  $enclosure = '"', boolean  $encloseAll = false, boolean  $nullToMysqlNull = false) : string

Convert an array to CSV

Parameters

array $fields
string $delimiter
string $enclosure
boolean $encloseAll
boolean $nullToMysqlNull

Returns

string

download_send_headers()

download_send_headers(  $filename) 

Download the CSV file

Parameters

$filename