68 $this->separator = $a_sep;
80 $this->delimiter = $a_del;
92 $this->first_entry =
true;
115 if(!$this->first_entry)
120 $this->csv .= $this->
quote($a_col);
122 $this->first_entry =
false;
147 return str_replace($this->delimiter,$this->delimiter.$this->delimiter, ($this->doUTF8Decoding) ? utf8_decode( $a_str ) : $a_str);
An exception for terminatinating execution or to throw for unit testing.
Helper class to generate CSV files.
quote($a_str)
Quote Delimiter by doubling it This seems to be the standard way in Excel and Openoffice.
__construct()
Constructor.
setSeparator($a_sep)
Set Seperator.
setDoUTF8Decoding($doUTF8Decoding)
set to true if you want to utf8 decode for output.
getCSVString()
Get CSV string.
addColumn($a_col)
Add Column.
setDelimiter($a_del)
Set delimiter.