Skip to content

Commit 1bac9a1

Browse files
committed
add insert by array
1 parent 6c6b92a commit 1bac9a1

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

CsvFile.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ public function addLine($line)
4646
return $this;
4747
}
4848

49+
/**
50+
* Add lines to file
51+
* @param array $lines Array of lines
52+
* @return object this
53+
*/
54+
public function addLines(array $lines)
55+
{
56+
foreach ($lines as $line) {
57+
$this->addLine($line);
58+
}
59+
return $this;
60+
}
61+
4962
/**
5063
* Save content to file
5164
* @param $filePath

0 commit comments

Comments
 (0)