CodeExplorer getCsvOptions example
$i = 0;
foreach ($data as $key =>
$value) { if ($i !==
$key || !\
is_array($value)) { $data =
[$data];
break;
} ++
$i;
} } [$delimiter,
$enclosure,
$escapeChar,
$keySeparator,
$headers,
$escapeFormulas,
$outputBom] =
$this->
getCsvOptions($context);
foreach ($data as &
$value) { $flattened =
[];
$this->
flatten($value,
$flattened,
$keySeparator, '',
$escapeFormulas);
$value =
$flattened;
} unset($value);
$headers =
array_merge(array_values($headers),
array_diff($this->
extractHeaders($data),
$headers));
$endOfLine =
$context[self::END_OF_LINE
] ??
$this->defaultContext
[self::END_OF_LINE
];
$i = 0;
foreach ($data as $key =>
$value) { if ($i !==
$key || !\
is_array($value)) { $data =
[$data];
break;
} ++
$i;
} } [$delimiter,
$enclosure,
$escapeChar,
$keySeparator,
$headers,
$escapeFormulas,
$outputBom] =
$this->
getCsvOptions($context);
foreach ($data as &
$value) { $flattened =
[];
$this->
flatten($value,
$flattened,
$keySeparator, '',
$escapeFormulas);
$value =
$flattened;
} unset($value);
$headers =
array_merge(array_values($headers),
array_diff($this->
extractHeaders($data),
$headers));
$endOfLine =
$context[self::END_OF_LINE
] ??
$this->defaultContext
[self::END_OF_LINE
];