CSVReadOptions
Read onlyYes
FinalYes
Properties
- $charactersReadInLine : int|null
- $emptyToNull : bool
- $enclosure : string|null
- $escape : string|null
- $missingColumnsAsNull : bool
- $removeBOM : bool
- $separator : string|null
- $withHeader : bool
Methods
- __construct() : mixed
- fromArray() : self
- normalize() : array{with_header: bool, empty_to_null: bool, remove_bom: bool, separator: null|string, enclosure: null|string, escape: null|string, characters_read_in_line: null|int, missing_columns_as_null: bool}
- positive() : null|int<1, max>
- withCharactersReadInLine() : self
- withEmptyToNull() : self
- withEnclosure() : self
- withEscape() : self
- withHeader() : self
- withMissingColumnsAsNull() : self
- withRemoveBOM() : self
- withSeparator() : self
Properties
$charactersReadInLine
public
int|null
$charactersReadInLine
= null
$emptyToNull
public
bool
$emptyToNull
= true
$enclosure
public
string|null
$enclosure
= null
$escape
public
string|null
$escape
= null
$missingColumnsAsNull
public
bool
$missingColumnsAsNull
= false
$removeBOM
public
bool
$removeBOM
= true
$separator
public
string|null
$separator
= null
$withHeader
public
bool
$withHeader
= true
Methods
__construct()
public
__construct([bool $withHeader = true ][, bool $emptyToNull = true ][, bool $removeBOM = true ][, string|null $separator = null ][, string|null $enclosure = null ][, string|null $escape = null ][, null|int<1, max> $charactersReadInLine = null ][, bool $missingColumnsAsNull = false ]) : mixed
Parameters
- $withHeader : bool = true
- $emptyToNull : bool = true
- $removeBOM : bool = true
- $separator : string|null = null
- $enclosure : string|null = null
- $escape : string|null = null
- $charactersReadInLine : null|int<1, max> = null
-
- bytes read per step from a remote stream (S3, Azure); never splits a line
- $missingColumnsAsNull : bool = false
fromArray()
public
static fromArray(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
-
the shape of normalize()
Return values
selfnormalize()
public
normalize() : array{with_header: bool, empty_to_null: bool, remove_bom: bool, separator: null|string, enclosure: null|string, escape: null|string, characters_read_in_line: null|int, missing_columns_as_null: bool}
Return values
array{with_header: bool, empty_to_null: bool, remove_bom: bool, separator: null|string, enclosure: null|string, escape: null|string, characters_read_in_line: null|int, missing_columns_as_null: bool}positive()
public
static positive(int|null $value) : null|int<1, max>
Parameters
- $value : int|null
Return values
null|int<1, max>withCharactersReadInLine()
public
withCharactersReadInLine(int<1, max> $charactersReadInLine) : self
Parameters
- $charactersReadInLine : int<1, max>
-
- bytes read per step from a remote stream (S3, Azure); never splits a line
Return values
selfwithEmptyToNull()
public
withEmptyToNull(bool $emptyToNull) : self
Parameters
- $emptyToNull : bool
Return values
selfwithEnclosure()
public
withEnclosure(string $enclosure) : self
Parameters
- $enclosure : string
Return values
selfwithEscape()
public
withEscape(string $escape) : self
Parameters
- $escape : string
Return values
selfwithHeader()
public
withHeader(bool $withHeader) : self
Parameters
- $withHeader : bool
Return values
selfwithMissingColumnsAsNull()
public
withMissingColumnsAsNull(bool $missingColumnsAsNull) : self
Parameters
- $missingColumnsAsNull : bool
Return values
selfwithRemoveBOM()
public
withRemoveBOM(bool $removeBOM) : self
Parameters
- $removeBOM : bool
Return values
selfwithSeparator()
public
withSeparator(string $separator) : self
Parameters
- $separator : string