CsvParser
abstract class CsvParser extends MetadataParser
Constants
COLUMN_SYNONYMS |
Column name synonyms. |
Properties
SplFileObject | $fileObject | from MetadataParser |
Methods
Get the MIME types that files known by this parser can have.
Get the name of the parser to show it to users selecting files.
Returns true if the file is in the format understood by the parser.
Get a filled VolumeMetadata object based on the file.
No description
No description
No description
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']
at line 44
static string
getName()
Get the name of the parser to show it to users selecting files.
Example: 'BIIGLE CSV'
in
MetadataParser at line 26
__construct(SplFileInfo $file)
No description
at line 52
bool
recognizesFile()
Returns true if the file is in the format understood by the parser.
at line 76
abstract VolumeMetadata
getMetadata()
Get a filled VolumeMetadata object based on the file.
in
MetadataParser at line 41
protected SplFileObject
getFileObject()
No description
at line 78
protected SeekableIterator
getCsvIterator()
No description
at line 86
protected array
processFirstLine(array $line)
No description
at line 96
protected array
getKeyMap(array $line)
No description
at line 115
protected float|null
maybeCastToFloat(string|null $value)
Cast the value to float if it is not null or an empty string.