abstract class CsvParser extends MetadataParser

Constants

COLUMN_SYNONYMS

Column name synonyms.

Properties

SplFileObject $fileObject from  MetadataParser

Methods

static array
getKnownMimeTypes()

Get the MIME types that files known by this parser can have.

static string
getName()

Get the name of the parser to show it to users selecting files.

__construct(SplFileInfo $file)

No description

bool
recognizesFile()

Returns true if the file is in the format understood by the parser.

getMetadata()

Get a filled VolumeMetadata object based on the file.

getCsvIterator()

No description

array
processFirstLine(array $line)

No description

array
getKeyMap(array $line)

No description

float|null
maybeCastToFloat(string|null $value)

Cast the value to float if it is not null or an empty string.

Details

at line 33
static array getKnownMimeTypes()

Get the MIME types that files known by this parser can have.

Example: ['text/csv']

Return Value

array

at line 44
static string getName()

Get the name of the parser to show it to users selecting files.

Example: 'BIIGLE CSV'

Return Value

string

in MetadataParser at line 26
__construct(SplFileInfo $file)

No description

Parameters

SplFileInfo $file

at line 52
bool recognizesFile()

Returns true if the file is in the format understood by the parser.

Return Value

bool

at line 76
abstract VolumeMetadata getMetadata()

Get a filled VolumeMetadata object based on the file.

Return Value

VolumeMetadata

in MetadataParser at line 41
protected SplFileObject getFileObject()

No description

Return Value

SplFileObject

at line 78
protected SeekableIterator getCsvIterator()

No description

Return Value

SeekableIterator

at line 86
protected array processFirstLine(array $line)

No description

Parameters

array $line

Return Value

array

at line 96
protected array getKeyMap(array $line)

No description

Parameters

array $line

Return Value

array

at line 115
protected float|null maybeCastToFloat(string|null $value)

Cast the value to float if it is not null or an empty string.

Parameters

string|null $value

Return Value

float|null