Flow PHP

CSVRowNormalizer

Read onlyYes
FinalYes

Methods

__construct()  : mixed
normalize()  : array<int, null|string>
Normalize CSV row data to match the expected number of headers.

Methods

__construct()

public __construct([bool $emptyToNull = true ]) : mixed
Parameters
$emptyToNull : bool = true

normalize()

Normalize CSV row data to match the expected number of headers.

public normalize(array<int, null|string> $rowData, int $headersCount) : array<int, null|string>
  • Expands rows with fewer columns by adding fill values
  • Truncates rows with more columns to match header count
  • Converts empty strings to null if emptyToNull is enabled.
Parameters
$rowData : array<int, null|string>
$headersCount : int
Return values
array<int, null|string>

        
On this page

Search results