Documentation

Varien_File_Csv
in package

Csv parse

Table of Contents

Properties

$_delimiter  : mixed
$_enclosure  : mixed
$_escape  : mixed
$_lineLength  : mixed

Methods

__construct()  : mixed
fputcsv()  : mixed
getData()  : array<string|int, mixed>
Retrieve CSV file data as array
getDataPairs()  : array<string|int, mixed>
Retrieve CSV file data as pairs
saveData()  : Varien_File_Csv
Saving data row array into file
setDelimiter()  : Varien_File_Csv
Set CSV column delimiter
setEnclosure()  : Varien_File_Csv
Set CSV column value enclosure
setLineLength()  : Varien_File_Csv
Set max file line length

Properties

$_delimiter

protected mixed $_delimiter = ','

$_enclosure

protected mixed $_enclosure = '"'

$_escape

protected mixed $_escape = '\\'

$_lineLength

protected mixed $_lineLength = 0

Methods

__construct()

public __construct() : mixed

fputcsv()

public fputcsv(mixed &$handle[, mixed $fields = [] ][, mixed $delimiter = ',' ][, mixed $enclosure = '"' ]) : mixed
Parameters
$handle : mixed
$fields : mixed = []
$delimiter : mixed = ','
$enclosure : mixed = '"'

getData()

Retrieve CSV file data as array

public getData(string $file) : array<string|int, mixed>
Parameters
$file : string
Return values
array<string|int, mixed>

getDataPairs()

Retrieve CSV file data as pairs

public getDataPairs(string $file[, int $keyIndex = 0 ][, int $valueIndex = 1 ]) : array<string|int, mixed>
Parameters
$file : string
$keyIndex : int = 0
$valueIndex : int = 1
Return values
array<string|int, mixed>

saveData()

Saving data row array into file

public saveData(string $file, array<string|int, mixed> $data) : Varien_File_Csv
Parameters
$file : string
$data : array<string|int, mixed>
Return values
Varien_File_Csv

        
On this page

Search results