Public Member Functions | |
__construct () | |
reset () | |
detect ($text) | |
Data Fields | |
$debug | |
$separators | |
$enclosures | |
Protected Member Functions | |
debug ($msg) | |
Definition at line 128 of file Class.Dcp_Utils_CSVFormatDetector.php.
__construct | ( | ) |
Definition at line 134 of file Class.Dcp_Utils_CSVFormatDetector.php.
|
protected |
Print a debug message if debug is enable.
$msg |
Definition at line 158 of file Class.Dcp_Utils_CSVFormatDetector.php.
detect | ( | $text | ) |
Detect the CSV separator and enclosure of the given CSV text data
The returned array contains the detected separator and enclosure with their confidence score expressed as a floating point value in the range [0, 1]:
Example:
array( 'separator' => array( 'char' => ';' 'confidence' => 1 ) , 'enclosure' => array( 'char' => null, 'confidence' => 0 ) )
null values indicates that the corresponding value could not be detected.
$text |
Definition at line 188 of file Class.Dcp_Utils_CSVFormatDetector.php.
reset | ( | ) |
Reset detector's internal logic.
Definition at line 141 of file Class.Dcp_Utils_CSVFormatDetector.php.
Definition at line 130 of file Class.Dcp_Utils_CSVFormatDetector.php.
$enclosures |
Definition at line 132 of file Class.Dcp_Utils_CSVFormatDetector.php.
$separators |
Definition at line 131 of file Class.Dcp_Utils_CSVFormatDetector.php.