PHPackages                             daleattree/csvfilehandler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. daleattree/csvfilehandler

ActiveLibrary

daleattree/csvfilehandler
=========================

A library that loads and parses a CSV file, returning an object of the file with each CSV line as an object

1.0.12(10y ago)124.9k↓36.7%6[1 PRs](https://github.com/daleattree/csvfilehandler/pulls)GPL-2.0PHPPHP &gt;=5.3.3

Since Oct 4Pushed 5y ago2 watchersCompare

[ Source](https://github.com/daleattree/csvfilehandler)[ Packagist](https://packagist.org/packages/daleattree/csvfilehandler)[ RSS](/packages/daleattree-csvfilehandler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

CSV File Handler (CsvFileHandler)
=================================

[](#csv-file-handler-csvfilehandler)

A library that loads and parses a CSV file, returning an object of the file with each CSV line as an object (License: GPL-2.0)

\##Installation

\###Included in a PHP Project w/ Composer

Add the following to your composer.json file using the latest version number or 1.0.\* to keep it fresh:

```
"require": {
  "daleattree/csvfilehandler": "1.0.*"
}
```

\##Usage

```
$csvFileHandler = new daleattree\CsvFileHandler\CsvFileHandler($filename, [$headerRow = true], [$delimiter = ','], [$enclosure = '"'], [$escape = '\\'], [$autoParse = true]);
```

\###Example

\####CSV File Content

```
id,greeting1,greeting2,salutation
1,"Regards, Test",hello,"there"

```

#### Code

[](#code)

```
foreach($csvFileHandler->getRecords() as $record){
  echo $record->getId() . PHP_EOL .
  $record->getGreeting2()() . ' ' . $record->getSalutation() . PHP_EOL .
  $record->getGreeting1() . PHP_EOL;
}
```

If the CSV file is too large for it to be efficiently loaded into memory, you can set $autoParse to false and read one line at a time from the file.

```
while(false !== ($row = $this->handler->readRecord())){
    //do something
}
```

\####Output

```
1
hello there
Regards, Test

```

If there is a header row, the column names will be camel-cased and accessible on RecordObject via get\[ColumnName\] and set\[ColumnName\] If there is no header row, column names default to col\[n\], n being the column index (zero-based).

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 56.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Recently: every ~0 days

Total

11

Last Release

3781d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21a84315dd24a218726cccba37565109336fc2b448cd6e4dd7c8b87e8cd02d14?d=identicon)[daleattree](/maintainers/daleattree)

---

Top Contributors

[![daleattree](https://avatars.githubusercontent.com/u/2201967?v=4)](https://github.com/daleattree "daleattree (13 commits)")[![mostertb](https://avatars.githubusercontent.com/u/2180195?v=4)](https://github.com/mostertb "mostertb (7 commits)")[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (1 commits)")[![pierredup](https://avatars.githubusercontent.com/u/144858?v=4)](https://github.com/pierredup "pierredup (1 commits)")[![sarelvdwalt](https://avatars.githubusercontent.com/u/2071493?v=4)](https://github.com/sarelvdwalt "sarelvdwalt (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/daleattree-csvfilehandler/health.svg)

```
[![Health](https://phpackages.com/badges/daleattree-csvfilehandler/health.svg)](https://phpackages.com/packages/daleattree-csvfilehandler)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
