2017 © Pedro Peláez
 

library commie

A simplistic OO wrapper around PHP's built in CSV handling that lets you reference columns by header name

image

rovangju/commie

A simplistic OO wrapper around PHP's built in CSV handling that lets you reference columns by header name

  • Sunday, May 26, 2013
  • by rovangju
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Introduction

Commie is a simplistic object-orientated wrapper around PHP's built in CSV handling., (*1)

The key difference with Commie is that it's the first library that will allow you to traverse the file's columns by name - as well as painlessly jump around the file in an efficient manner., (*2)

There's a few antique packages out in the wild that handle CSV files, however all of them seem to be lacking in one way or another, and don't lend themselves well to customization for the wild formats delimited data can come in. Commie implements a 'mapper' concept that allows you to do whatever strange things you need in addition to the core for traversal of your data., (*3)

Quick start

<?php

require_once 'Commie/_config.php';
/* ^-- Not needed if you use a PSR-0 autoloader, just register it normally */

use Commie\CSVFile;

$file = new SplFileObject('./file.csv');
$csv = new CSVFile($file, TRUE);

while (($row = $csv->read())) {
    echo $row->col('My Heading')->value();
}

echo $csv->row(10)->col('TOTAL')->value();

Further details

You can examine the source, or you can generate the documentation using apigen (Once apigen 3.00 is released the docs will be committed as markdown for github), (*4)

The Versions

26/05 2013

dev-develop

dev-develop http://github.com/rovangju/commie/

A simplistic OO wrapper around PHP's built in CSV handling that lets you reference columns by header name

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

csv comma separated value delimited text

19/04 2013

dev-master

9999999-dev http://github.com/rovangju/commie/

A simplistic OO wrapper around PHP's built in CSV handling that lets you reference columns by header name

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

csv comma separated value delimited text

19/04 2013

0.0.1-beta

0.0.1.0-beta http://github.com/rovangju/commie/

A simplistic OO wrapper around PHP's built in CSV handling that lets you reference columns by header name

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

csv comma separated value delimited text