class CsvFile extendsFile

Properties

protectedstring $path File path. from File
protectedresource $handle File handle. from File
protectedstring $delimiter Field delimiter.
protectedstring $enclosure String enclosure character.
protectedstring $escape_char Escape character.

Methods

static CsvFile
makeTmp()

Creates a new temporary file.

from File
__construct(string$path =null,string$delimiter =',',string$enclosure ='"',string$escape_char ='\\')

Create a new CSV file.

__destruct()

No description

from File
delete()

Delete the file.

from File
close()

Close the file.

from File
string
getPath()

Returns the path to the file.

from File
put(array$items)

Append a new row to the CSV file.

Details

inFileat line29
staticCsvFile makeTmp()

Creates a new temporary file.

Return Value

CsvFile

at line36
__construct(string$path =null,string$delimiter =',',string$enclosure ='"',string$escape_char ='\\')

Create a new CSV file.

Parameters

string $path File path. If not set, a temporary file will be created.
string $delimiter Optional field delimiter
string $enclosure Optional string enclosure character
string $escape_char Oprional escape character

inFileat line50
__destruct()

inFileat line58
delete()

Delete the file.

inFileat line67
close()

Close the file.

inFileat line81
string getPath()

Returns the path to the file.

Return Value

string

at line49
put(array$items)

Append a new row to the CSV file.

Parameters

array $items Row items