|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Helper class to generate CSV files. More...
Collaboration diagram for ilCSVWriter:Public Member Functions | |
| __construct () | |
| Constructor. More... | |
| setSeparator ($a_sep) | |
| Set Seperator. More... | |
| setDelimiter ($a_del) | |
| Set delimiter. More... | |
| addRow () | |
| Add new line. More... | |
| setDoUTF8Decoding ($doUTF8Decoding) | |
| set to true if you want to utf8 decode for output. More... | |
| addColumn ($a_col) | |
| Add Column. More... | |
| getCSVString () | |
| Get CSV string. More... | |
Private Member Functions | |
| quote ($a_str) | |
| Quote Delimiter by doubling it This seems to be the standard way in Excel and Openoffice. More... | |
Private Attributes | |
| $csv = '' | |
| $separator = ',' | |
| $delimiter = '"' | |
| $new_line = "\n" | |
| $doUTF8Decoding = false | |
| $first_entry = true | |
Helper class to generate CSV files.
Default field seperator is ',' Default string delimiter is '"' Multiple "-'s will be substituted with ""
Definition at line 38 of file class.ilCSVWriter.php.
| ilCSVWriter::__construct | ( | ) |
Constructor.
@access public
Definition at line 55 of file class.ilCSVWriter.php.
| ilCSVWriter::addColumn | ( | $a_col | ) |
Add Column.
Will be quoted automatically
@access public
| string | column value |
Definition at line 112 of file class.ilCSVWriter.php.
References $delimiter, $separator, and quote().
Here is the call graph for this function:| ilCSVWriter::addRow | ( | ) |
Add new line.
@access public
Definition at line 88 of file class.ilCSVWriter.php.
References $new_line.
| ilCSVWriter::getCSVString | ( | ) |
Get CSV string.
@access public
Definition at line 130 of file class.ilCSVWriter.php.
References $csv.
|
private |
Quote Delimiter by doubling it This seems to be the standard way in Excel and Openoffice.
@access private
| string | field value |
Definition at line 143 of file class.ilCSVWriter.php.
Referenced by addColumn().
Here is the caller graph for this function:| ilCSVWriter::setDelimiter | ( | $a_del | ) |
Set delimiter.
@access public
| string | field delimiter |
Definition at line 77 of file class.ilCSVWriter.php.
| ilCSVWriter::setDoUTF8Decoding | ( | $doUTF8Decoding | ) |
set to true if you want to utf8 decode for output.
| doUTF8Decoding | boolean if set to true file is written using a utf8decode before writing values |
Definition at line 100 of file class.ilCSVWriter.php.
References $doUTF8Decoding.
| ilCSVWriter::setSeparator | ( | $a_sep | ) |
Set Seperator.
@access public
| string | field seperator |
Definition at line 65 of file class.ilCSVWriter.php.
|
private |
Definition at line 40 of file class.ilCSVWriter.php.
Referenced by getCSVString().
|
private |
Definition at line 42 of file class.ilCSVWriter.php.
Referenced by addColumn().
|
private |
Definition at line 44 of file class.ilCSVWriter.php.
Referenced by setDoUTF8Decoding().
|
private |
Definition at line 46 of file class.ilCSVWriter.php.
|
private |
Definition at line 43 of file class.ilCSVWriter.php.
Referenced by addRow().
|
private |
Definition at line 41 of file class.ilCSVWriter.php.
Referenced by addColumn().