Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Detector Class Reference
+ Collaboration diagram for Detector:

Public Member Functions

 __construct ()
 
 reset ()
 
 detect ($text)
 

Data Fields

 $debug
 
 $separators
 
 $enclosures
 

Protected Member Functions

 debug ($msg)
 

Detailed Description

Definition at line 128 of file Class.Dcp_Utils_CSVFormatDetector.php.

Constructor & Destructor Documentation

__construct ( )

Definition at line 134 of file Class.Dcp_Utils_CSVFormatDetector.php.

Member Function Documentation

debug (   $msg)
protected

Print a debug message if debug is enable.

Parameters
$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.

Parameters
$text
Returns
array

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.

Field Documentation

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.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen