Skip to content

Commit

Permalink
Merge pull request #9 from nyamsprod/psr4
Browse files Browse the repository at this point in the history
Moving the library from PSR-0 to PSR-4
  • Loading branch information
nyamsprod committed Feb 14, 2014
2 parents 837f729 + 941299f commit a24d0ce
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ language: php
php:
- 5.4
- 5.5
- 5.6
- hhvm

before_script:
Expand Down
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 a24d0ce

Please sign in to comment.