Skip to content

Commit

Permalink
Modified README to remove identifier stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdb committed Jan 3, 2016
1 parent 2cfa7b3 commit 538fcc6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,15 @@ The currency defaults to 'GBP', if you want to change this you will need to pass

```php
use jamesdb\Cart\Cart;
use jamesdb\Cart\Identifier\StringIdentifier;
use jamesdb\Cart\Storage\NativeSessionDriver;
use SebastianBergmann\Money\Currency;

$cart = new Cart(new StringIdentifier('cart'), new NativeSessionDriver);
$cart = new Cart('cart', new NativeSessionDriver);
$cart->setCurrency(new Currency('GBP'));
```

Any storage implementation can be used as long as it implements the ```jamesdb\Cart\Storage\StorageInterface```.

In scenarios where you want to assign a custom cart identifier such as a user id you can implement ```jamesdb\Cart\identifier\IdentifierInterface```.

## Usage

### Adding Items
Expand Down

0 comments on commit 538fcc6

Please sign in to comment.