GoogleSheetReadOptions
Read onlyYes
FinalYes
Tags
Properties
- $emptyToNull : bool
- $missingColumnsAsNull : bool
- $options : array<string|int, mixed>
- $withHeader : bool
Methods
- __construct() : mixed
- decoder() : RecordDecoder
- A fresh decoder per pass - the sample and the read each consume their own header row.
- typer() : TypeNarrower
- FORMATTED_VALUE is the only render option under which every cell arrives as a string, so it is the only one where the string ladder has anything to read; the others hand over typed JSON scalars.
- withEmptyToNull() : self
- withHeader() : self
- withMissingColumnsAsNull() : self
- withOptions() : self
Properties
$emptyToNull
public
bool
$emptyToNull
= true
$missingColumnsAsNull
public
bool
$missingColumnsAsNull
= false
$options
public
array<string|int, mixed>
$options
= []
$withHeader
public
bool
$withHeader
= true
Methods
__construct()
public
__construct([bool $withHeader = true ][, bool $missingColumnsAsNull = false ][, bool $emptyToNull = true ][, GoogleSheetOptions $options = [] ]) : mixed
Parameters
- $withHeader : bool = true
- $missingColumnsAsNull : bool = false
- $emptyToNull : bool = true
- $options : GoogleSheetOptions = []
decoder()
A fresh decoder per pass - the sample and the read each consume their own header row.
public
decoder() : RecordDecoder
Return values
RecordDecodertyper()
FORMATTED_VALUE is the only render option under which every cell arrives as a string, so it is the only one where the string ladder has anything to read; the others hand over typed JSON scalars.
public
typer(InferredTypes $candidates) : TypeNarrower
Parameters
- $candidates : InferredTypes
Return values
TypeNarrowerwithEmptyToNull()
public
withEmptyToNull(bool $emptyToNull) : self
Parameters
- $emptyToNull : bool
Return values
selfwithHeader()
public
withHeader(bool $withHeader) : self
Parameters
- $withHeader : bool
Return values
selfwithMissingColumnsAsNull()
public
withMissingColumnsAsNull(bool $missingColumnsAsNull) : self
Parameters
- $missingColumnsAsNull : bool
Return values
selfwithOptions()
public
withOptions(GoogleSheetOptions $options) : self
Parameters
- $options : GoogleSheetOptions