Delimiter
in package
Table of Contents
Constants
- POTENTIAL_DELIMETERS = [',', ';', "\t", '|', ':', ' ', '~']
Properties
- $counts : array<string|int, mixed>
- $delimiter : string|null
- $enclosure : string
- $escapeCharacter : string
- $fileHandle : resource
- $numberLines : int
Methods
- __construct() : mixed
- getDefaultDelimiter() : string
- getNextLine() : false|string
- Get the next full line from the file.
- infer() : string|null
- linesCounted() : int
- countDelimiterValues() : void
- countPotentialDelimiters() : void
Constants
POTENTIAL_DELIMETERS
protected
mixed
POTENTIAL_DELIMETERS
= [',', ';', "\t", '|', ':', ' ', '~']
Properties
$counts
protected
array<string|int, mixed>
$counts
= []
$delimiter
protected
string|null
$delimiter
= null
$enclosure
protected
string
$enclosure
$escapeCharacter
protected
string
$escapeCharacter
$fileHandle
protected
resource
$fileHandle
$numberLines
protected
int
$numberLines
= 0
Methods
__construct()
public
__construct(resource $fileHandle, string $escapeCharacter, string $enclosure) : mixed
Parameters
- $fileHandle : resource
- $escapeCharacter : string
- $enclosure : string
getDefaultDelimiter()
public
getDefaultDelimiter() : string
Return values
stringgetNextLine()
Get the next full line from the file.
public
getNextLine() : false|string
Return values
false|stringinfer()
public
infer() : string|null
Return values
string|nulllinesCounted()
public
linesCounted() : int
Return values
intcountDelimiterValues()
protected
countDelimiterValues(string $line, array<string|int, mixed> $delimiterKeys) : void
Parameters
- $line : string
- $delimiterKeys : array<string|int, mixed>
countPotentialDelimiters()
protected
countPotentialDelimiters() : void