Skip to content

Commit

Permalink
Merge pull request #141 from mariomka/patch-1
Browse files Browse the repository at this point in the history
Allow `shouldAddBom` in `streamDownload`
  • Loading branch information
freekmurze authored Mar 13, 2023
2 parents 100e963 + 01f812e commit f9afb9d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/SimpleExcelWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ public static function createWithoutBom(string $file, string $type = ''): static
);
}

public static function streamDownload(string $downloadName, string $type = '', callable $writerCallback = null, ?string $delimiter = null): static
{
$simpleExcelWriter = new static($downloadName, $type, $delimiter);
public static function streamDownload(
string $downloadName,
string $type = '',
callable $writerCallback = null,
?string $delimiter = null,
?bool $shouldAddBom = null,
): static {
$simpleExcelWriter = new static($downloadName, $type, $delimiter, $shouldAddBom);

$writer = $simpleExcelWriter->getWriter();

Expand Down

0 comments on commit f9afb9d

Please sign in to comment.