From a3e35822229a36b84f4acaf6d94e208a111f27eb Mon Sep 17 00:00:00 2001 From: William Knauss Date: Wed, 14 May 2014 10:26:32 -0400 Subject: [PATCH 1/5] Patch for #5 --- parsecsv.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsecsv.lib.php b/parsecsv.lib.php index badc945..7a6d8f9 100644 --- a/parsecsv.lib.php +++ b/parsecsv.lib.php @@ -70,7 +70,7 @@ class parseCSV { # convert 2D array to csv data and send headers # to browser to treat output as a file and download it $csv = new parseCSV(); - $csv->output (true, 'movies.csv', $array); + $csv->output('movies.csv', $array, array('field 1', 'field 2'), ','); ---------------- */ From ab069e5d2d45acdcca54c59bb9191e39ca91acfb Mon Sep 17 00:00:00 2001 From: William Knauss Date: Fri, 16 May 2014 17:35:08 -0400 Subject: [PATCH 2/5] Updated readme --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 17536ea..f73a287 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,13 @@ # parseCSV -_Note: I am no longer actively working on this library, but please submit pull -requests for any fixes/features you would like to see added._ +Note: parseCSV is now being revised to PHP 5 standards. If you have an issue or a feature request we encourage you to open an issue. -parseCSV is an easy to use PHP class to read and write CSV data properly. It +parseCSV is an easy to use PHP class that reads and writes CSV data properly. It fully conforms to the specifications outlined on the on the -[Wikipedia article][CSV]. It has a few advanced features which help make your +[Wikipedia article][CSV]. It has many advanced features which help make your life easier when dealing with CSV data. -I originally created this library in early 2007 due to the lack of built-in +This library was originaly created in early 2007 by [jimeh](https://github.com/jimeh) due to the lack of built-in and third-party support for handling CSV data in PHP. [csv]: http://en.wikipedia.org/wiki/Comma-separated_values @@ -84,7 +83,7 @@ a file and download it** ```php $csv = new parseCSV(); -$csv->output(true, 'movies.csv', $array); +$csv->output('movies.csv', $array, array('field 1', 'field 2'), ','); ``` From 55aaa1eb176221b5e72cdf9f505bac1324c31b53 Mon Sep 17 00:00:00 2001 From: William Knauss Date: Fri, 16 May 2014 17:36:14 -0400 Subject: [PATCH 3/5] Grammer Fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f73a287..2f0197e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ and third-party support for handling CSV data in PHP. ## Features * parseCSV is the only complete and fully featured CSV solution for PHP (as - far as i know). + far as I know). * Supports enclosed values, enclosed commas, double quotes and new lines. * Automatic delimiter character detection. * Sort data by specific fields/columns. From dbf415bd92c386129561c70c5c45014b37115324 Mon Sep 17 00:00:00 2001 From: William Knauss Date: Fri, 16 May 2014 19:30:59 -0400 Subject: [PATCH 4/5] Added Composer.json --- composer.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..7c2625f --- /dev/null +++ b/composer.json @@ -0,0 +1,17 @@ +{ + "name": "parsecsv/php-parsecsv", + "description": "CSV data parser for PHP", + "license": "MIT", + "authors": [ + { + "name": "Jim Mygrberg", + "email": "contact@jimeh.me" + } + ], + "autoload": { + "classmap": ["."] + }, + "require-dev": { + "phpunit/phpunit": "4.1.*" + } +} From c1a6946815b0320b7d976d8927b7db97224ae6b8 Mon Sep 17 00:00:00 2001 From: William Knauss Date: Fri, 16 May 2014 19:33:15 -0400 Subject: [PATCH 5/5] added gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f4acd3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +vendor/ +composer.lock \ No newline at end of file