Skip to content

Commit

Permalink
Added a note about the serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
florianv committed Jun 8, 2015
1 parent c0f0b4e commit 5dd7e55
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ $nextDate = $business->closest(new \DateTime('2015-05-11 10:00'));
$lastDate = $business->closest(new \DateTime('2015-05-11 10:00'), Business::CLOSEST_LAST);
```

### Serialization

The `Business` class can be serialized so it can be stored for later reuse:

```php
$serialized = serialize($business);
$business = unserialize($serialized);
```

If you use `SpecialDay` instances, you need to install the `jeremeamia/superclosure` library providing closure serialization:

```bash
$ composer require jeremeamia/superclosure
```

## License

[MIT](https://github.com/florianv/business/blob/master/LICENSE)
Expand Down

0 comments on commit 5dd7e55

Please sign in to comment.