Skip to content

Commit

Permalink
Updating the library dropping PSR-0 in favor of PSR-4
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Feb 14, 2014
1 parent b335f34 commit 941299f
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ Bakame.csv

A simple library to easily load, manipulate and save CSV files in PHP 5.4+

This package is compliant with [PSR-0][], [PSR-1][], and [PSR-2][].
This package is compliant with [PSR-1][], [PSR-2][], and [PSR-4][].

[PSR-0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
[PSR-1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
[PSR-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[PSR-4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md


System Requirements
-------

You need **PHP >= 5.4.0** and the `mbstring` extension to use `Bakame\Csv` but the latest stable version of PHP is recommended.

Installation
Install
-------

You may install the Bakame.csv package with Composer (recommended) or manually.
Install the Bakame.csv package with Composer.

```json
{
Expand All @@ -29,10 +30,6 @@ You may install the Bakame.csv package with Composer (recommended) or manually.
}
```

**Manual Install:**

Download and extract the library in a specific directory, then add `'/path/to/Bakame/Csv/src'` to your PSR-0 compliant autoloader.

Usage
-------

Expand Down Expand Up @@ -197,7 +194,7 @@ $data = $reader->fetchAssoc(['firstname', 'lastname', 'email']);
// ]
//
```
>

> * If the number of values in a CSV row is lesser than the number of named keys, the method will add `null` values to compensate for the missing values.
> * If the number of values in a CSV row is greater that the number of named keys the exceeding values will be drop from the result set.
Expand Down Expand Up @@ -403,3 +400,5 @@ Credits

- [ignace nyamagana butera](https://github.com/nyamsprod)
- [All Contributors](graphs/contributors)

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/nyamsprod/bakame.csv/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"ext-mbstring" : "*"
},
"autoload": {
"psr-0": {
"Bakame": ["src", "test"]
"psr-4": {
"Bakame\\Csv\\": "src",
"Bakame\\CSv\\": "test"
}
}
}
}
4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

<testsuites>
<testsuite name="Bakame CSV Test Suite">
<directory>test/Bakame</directory>
<directory>test</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">src/Bakame</directory>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 941299f

Please sign in to comment.