Skip to content

Commit 636516d

Browse files
Added header count
1 parent e1a30cf commit 636516d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/CSV.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class CSV {
1919
private $headerOffset = 0;
2020
private $header = [];
2121
private $rowCount = 0;
22+
private $headerCount = 0;
2223
private $limit = [];
2324
private $parsedData = [];
2425

@@ -178,6 +179,15 @@ function rowCount() : int {
178179
return count($this->parsedData);
179180
}
180181

182+
/**
183+
* Get parsed data header count
184+
*
185+
* @return integer
186+
*/
187+
function headerCount() : int {
188+
return count($this->header);
189+
}
190+
181191
/**
182192
* Set data limit
183193
*

0 commit comments

Comments
 (0)