wCMF
3.6
|
Public Member Functions | |
getErrorMsg () | |
readCSVFile ($filename, $separator, $fielddelimiter) | |
getFieldValue ($line, $fieldName) | |
getValues ($line, $separator, $fielddelimiter) | |
Public Attributes | |
$_errorMsg = '' | |
$_fields = array() | |
CSVUtil provides basic support for csv file functionality. The first line of a csv file is supposed to hold the field names.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
Definition at line 29 of file class.CSVUtil.php.
CSVUtil::getErrorMsg | ( | ) |
Get last error message.
Definition at line 38 of file class.CSVUtil.php.
References $_errorMsg.
CSVUtil::readCSVFile | ( | $filename, | |
$separator, | |||
$fielddelimiter | |||
) |
Read a CSV file into an array
filename | The name of the CSV file |
separator | The field separator used in the CSV file (e.g. \t) |
fielddelimiter | The field delimiter used in the CSV file (e.g. ") |
Definition at line 50 of file class.CSVUtil.php.
References $_fields, and getValues().
CSVUtil::getFieldValue | ( | $line, | |
$fieldName | |||
) |
Get the values of of field from a line
line | The line (represented as array returned from readCSVFile) |
fieldName | The name of the field |
Definition at line 80 of file class.CSVUtil.php.
CSVUtil::getValues | ( | $line, | |
$separator, | |||
$fielddelimiter | |||
) |
Get the values of of line
line | The line to split |
separator | The field separator used in the CSV file (e.g. \t) |
fielddelimiter | The field delimiter used in the CSV file (e.g. ") |
Definition at line 94 of file class.CSVUtil.php.
Referenced by readCSVFile().
CSVUtil::$_errorMsg = '' |
Definition at line 31 of file class.CSVUtil.php.
Referenced by getErrorMsg().
CSVUtil::$_fields = array() |
Definition at line 32 of file class.CSVUtil.php.
Referenced by readCSVFile().