diff --git a/php/src/file/csv/CsvBuilder.php b/php/src/file/csv/CsvBuilder.php index c1ac0bc..97054ca 100644 --- a/php/src/file/csv/CsvBuilder.php +++ b/php/src/file/csv/CsvBuilder.php @@ -17,7 +17,7 @@ class CsvBuilder extends AbstractBuilder { parent::__construct($output, $params); } - protected function _write(array $row, ?array $rowStyle=null): void { + protected function _write(array $row, ?array $colsStyle=null, ?array $rowStyle=null): void { $this->fputcsv($row); } diff --git a/php/src/file/tab/AbstractBuilder.php b/php/src/file/tab/AbstractBuilder.php index ba913f4..457505d 100644 --- a/php/src/file/tab/AbstractBuilder.php +++ b/php/src/file/tab/AbstractBuilder.php @@ -69,7 +69,7 @@ abstract class AbstractBuilder extends TempStream implements IBuilder { $this->headers = $headers; } - protected abstract function _write(array $row, ?array $rowStyle=null): void; + protected abstract function _write(array $row, ?array $colsStyle=null, ?array $rowStyle=null): void; protected bool $wroteHeaders = false; @@ -101,11 +101,11 @@ abstract class AbstractBuilder extends TempStream implements IBuilder { return $row; } - function write(?array $row, ?array $rowStyle=null): void { + function write(?array $row, ?array $colsStyle=null, ?array $rowStyle=null): void { $row = $this->cookRow($row); if ($row === null) return; $this->writeHeaders(array_keys($row)); - $this->_write($row, $rowStyle); + $this->_write($row, $colsStyle, $rowStyle); } function writeAll(?iterable $rows=null, ?array $rowStyle=null): void { @@ -116,7 +116,7 @@ abstract class AbstractBuilder extends TempStream implements IBuilder { } if ($rows !== null) { foreach ($rows as $row) { - $this->write(cl::with($row), $rowStyle); + $this->write(cl::with($row), null, $rowStyle); } } if ($unsetRows) $this->rows = null;