|
noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
|
Manage the CSV : manage files and write CSV record. More...
Collaboration diagram for Noalyss_Csv:Public Member Functions | |
| __construct ($p_filename) | |
| add ($p_item, $p_type="text") | |
| Add column to export to csv , the string are enclosed with double-quote,. | |
| get_element () | |
| get_encoding () | |
| get_filename () | |
| get_sep_dec () | |
| get_sep_field () | |
| get_size () | |
| send_header () | |
| Send an header for CSV , the filename is corrected. | |
| set_element ($element) | |
| set_encoding ($encoding) | |
| set_filename ($filename) | |
| set_sep_dec ($sep_dec) | |
| set_sep_field ($sep_field) | |
| set_size ($size) | |
| write () | |
| the string are enclosed with double-quote, we remove problematic character and the number are formatted. | |
| write_header ($p_array) | |
| write header | |
Static Public Member Functions | |
| static | csv2table ($string) |
| convert CSV strings (content of a file) into HTML table, | |
Protected Member Functions | |
| clean () | |
| clean the row | |
| correct_name () | |
| Correct the name of the file , remove forbidden character and add extension and date. | |
| encode ($str) | |
| nb ($p_number) | |
| format the number for the CSV export | |
Private Attributes | |
| $element | |
| $encoding | |
| $filename | |
| $sep_dec | |
| $sep_field | |
| $size | |
Manage the CSV : manage files and write CSV record.
Definition at line 33 of file noalyss_csv.class.php.
| Noalyss_Csv::__construct | ( | $p_filename | ) |
Definition at line 43 of file noalyss_csv.class.php.
References size.
| Noalyss_Csv::add | ( | $p_item, | |
| $p_type = "text" ) |
Add column to export to csv , the string are enclosed with double-quote,.
| $p_item | value to export |
| $p_type | must be text(default) or number |
| Exception |
Definition at line 123 of file noalyss_csv.class.php.
|
protected |
clean the row
Definition at line 167 of file noalyss_csv.class.php.
References size.
Referenced by write().
|
protected |
Correct the name of the file , remove forbidden character and add extension and date.
Definition at line 62 of file noalyss_csv.class.php.
References noalyss_str_replace(), and record_log().
Referenced by send_header().
Here is the call graph for this function:
|
static |
convert CSV strings (content of a file) into HTML table,
| $string | CSV files |
Definition at line 304 of file noalyss_csv.class.php.
References $aRow, $encoding, $row, $sep_dec, $sep_field, $string, and h.
|
protected |
Definition at line 187 of file noalyss_csv.class.php.
| Noalyss_Csv::get_element | ( | ) |
Definition at line 214 of file noalyss_csv.class.php.
References $element.
| Noalyss_Csv::get_encoding | ( | ) |
| Noalyss_Csv::get_filename | ( | ) |
Definition at line 196 of file noalyss_csv.class.php.
References $filename.
| Noalyss_Csv::get_sep_dec | ( | ) |
| Noalyss_Csv::get_sep_field | ( | ) |
| Noalyss_Csv::get_size | ( | ) |
|
protected |
format the number for the CSV export
| $p_number | number |
Definition at line 176 of file noalyss_csv.class.php.
References $r, isNumber(), and noalyss_trim().
Here is the call graph for this function:| Noalyss_Csv::send_header | ( | ) |
Send an header for CSV , the filename is corrected.
If TEST_UNIT is defined, the function is called from a test file (located in scenario , see manual )and no header are requested
Definition at line 83 of file noalyss_csv.class.php.
References correct_name().
Here is the call graph for this function:| Noalyss_Csv::set_element | ( | $element | ) |
| Noalyss_Csv::set_encoding | ( | $encoding | ) |
| mixed | $encoding |
Definition at line 277 of file noalyss_csv.class.php.
References $encoding.
| Noalyss_Csv::set_filename | ( | $filename | ) |
| mixed | $filename |
Definition at line 205 of file noalyss_csv.class.php.
References $filename.
| Noalyss_Csv::set_sep_dec | ( | $sep_dec | ) |
| Noalyss_Csv::set_sep_field | ( | $sep_field | ) |
| mixed | $sep_field |
Definition at line 241 of file noalyss_csv.class.php.
References $sep_field.
| Noalyss_Csv::set_size | ( | $size | ) |
| Noalyss_Csv::write | ( | ) |
the string are enclosed with double-quote, we remove problematic character and the number are formatted.
Clean the row after exporting
Definition at line 139 of file noalyss_csv.class.php.
References $export, $i, $sep, $sep_field, $size, clean(), noalyss_str_replace(), and size.
Here is the call graph for this function:| Noalyss_Csv::write_header | ( | $p_array | ) |
write header
| array | $p_array | Array of 1 dimension with the contains of a row |
Definition at line 104 of file noalyss_csv.class.php.
References $i, $p_array, $sep, and $sep_field.
|
private |
Definition at line 37 of file noalyss_csv.class.php.
Referenced by get_element(), and set_element().
|
private |
Definition at line 40 of file noalyss_csv.class.php.
Referenced by csv2table(), get_encoding(), and set_encoding().
|
private |
Definition at line 36 of file noalyss_csv.class.php.
Referenced by get_filename(), and set_filename().
|
private |
Definition at line 39 of file noalyss_csv.class.php.
Referenced by csv2table(), get_sep_dec(), and set_sep_dec().
|
private |
Definition at line 38 of file noalyss_csv.class.php.
Referenced by csv2table(), get_sep_field(), set_sep_field(), write(), and write_header().
|
private |
Definition at line 41 of file noalyss_csv.class.php.
Referenced by add(), get_size(), set_size(), and write().