From 17ac1dee1a54dba6ca165348ce7b48a2f387de2a Mon Sep 17 00:00:00 2001 From: Susann Sgorzaly Date: Sun, 18 Feb 2018 12:42:53 +0100 Subject: [PATCH 1/2] renamed namespace --- composer.json | 6 +++--- src/Csv.php | 4 ++-- src/extensions/DatatypeTrait.php | 2 +- tests/methods/ConstructTest.php | 4 ++-- tests/methods/ParseTest.php | 4 ++-- tests/methods/SaveTest.php | 4 ++-- tests/properties/default_values_test.php | 6 +++++- tests/properties/worthless_test.php | 8 ++++++-- 8 files changed, 23 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index fa0286e..ec01fc3 100644 --- a/composer.json +++ b/composer.json @@ -14,9 +14,9 @@ ], "autoload":{ "psr-4":{ - "CSV\\": "src", - "CSV\\extensions\\": "src\\extensions", - "CSV\\tests\\": "tests" + "ParseCsv\\": "src", + "ParseCsv\\extensions\\": "src\\extensions", + "ParseCsv\\tests\\": "tests" } }, "require-dev": { diff --git a/src/Csv.php b/src/Csv.php index 7fe2fb0..74381e4 100644 --- a/src/Csv.php +++ b/src/Csv.php @@ -1,7 +1,7 @@ csv = new parseCSV(); + $this->csv = new Csv(); //setup the reflection class $this->reflection = new ReflectionClass($this->csv); From 76a0406effea7ddb6074d6022b073105e7e53c63 Mon Sep 17 00:00:00 2001 From: Susann Sgorzaly Date: Sun, 18 Feb 2018 12:43:19 +0100 Subject: [PATCH 2/2] updated examples for using new classname --- examples/basic.php | 4 ++-- examples/conditions.php | 4 ++-- examples/download.php | 6 +++--- examples/limit.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/basic.php b/examples/basic.php index 5744525..beec5cb 100644 --- a/examples/basic.php +++ b/examples/basic.php @@ -3,11 +3,11 @@ # include parseCSV class. -require_once('../parsecsv.lib.php'); +use ParseCsv\Csv; # create new parseCSV object. -$csv = new parseCSV(); +$csv = new Csv(); # Parse '_books.csv' using automatic delimiter detection... diff --git a/examples/conditions.php b/examples/conditions.php index c778b1d..c806428 100644 --- a/examples/conditions.php +++ b/examples/conditions.php @@ -3,11 +3,11 @@ # include parseCSV class. -require_once('../parsecsv.lib.php'); +use ParseCsv\Csv; # create new parseCSV object. -$csv = new parseCSV(); +$csv = new Csv(); # Example conditions: diff --git a/examples/download.php b/examples/download.php index bc4177f..19b46e1 100644 --- a/examples/download.php +++ b/examples/download.php @@ -2,11 +2,11 @@ # include parseCSV class. -require_once('../parsecsv.lib.php'); +use ParseCsv\Csv; # create new parseCSV object. -$csv = new parseCSV(); +$csv = new Csv(); # Parse '_books.csv' using automatic delimiter detection... @@ -31,4 +31,4 @@ $csv->output('books.csv'); # or is set to null, output will only return the generated CSV # output data, and will not output to the browser itself. -?> \ No newline at end of file +?> diff --git a/examples/limit.php b/examples/limit.php index a018f59..d0635b3 100644 --- a/examples/limit.php +++ b/examples/limit.php @@ -3,11 +3,11 @@ # include parseCSV class. -require_once('../parsecsv.lib.php'); +use ParseCsv\Csv; # create new parseCSV object. -$csv = new parseCSV(); +$csv = new Csv(); # if sorting is enabled, the whole CSV file