|
1 |
| -# psr7-http-status-exceptions |
| 1 | +# PSR-7 response wrapping HTTP exceptions for PHP 7 |
| 2 | + |
| 3 | +[](https://travis-ci.org/php-api-clients/psr7-http-status-exceptions) |
| 4 | +[](https://packagist.org/packages/api-clients/psr7-http-status-exceptions) |
| 5 | +[](https://packagist.org/packages/api-clients/psr7-http-status-exceptions) |
| 6 | +[](https://scrutinizer-ci.com/g/php-api-clients/psr7-http-status-exceptions/?branch=master) |
| 7 | +[](https://packagist.org/packages/api-clients/psr7-http-status-exceptions) |
| 8 | +[](https://travis-ci.org/php-api-clients/psr7-http-status-exceptions) |
| 9 | + |
| 10 | +# Installation |
| 11 | + |
| 12 | +To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`. |
| 13 | + |
| 14 | +``` |
| 15 | +composer require api-clients/psr7-http-status-exceptions |
| 16 | +``` |
| 17 | +# Usage |
| 18 | + |
| 19 | +This package includes a factory to create a new exception based on a response and previous exception: |
| 20 | + |
| 21 | +```php |
| 22 | +$exception ExceptionFactory::create($response, $previousException); |
| 23 | +``` |
| 24 | + |
| 25 | +# License |
| 26 | + |
| 27 | +The MIT License (MIT) |
| 28 | + |
| 29 | +Copyright (c) 2016 Cees-Jan Kiewiet |
| 30 | + |
| 31 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 32 | +of this software and associated documentation files (the "Software"), to deal |
| 33 | +in the Software without restriction, including without limitation the rights |
| 34 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 35 | +copies of the Software, and to permit persons to whom the Software is |
| 36 | +furnished to do so, subject to the following conditions: |
| 37 | + |
| 38 | +The above copyright notice and this permission notice shall be included in all |
| 39 | +copies or substantial portions of the Software. |
| 40 | + |
| 41 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 42 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 43 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 44 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 45 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 46 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 47 | +SOFTWARE. |
0 commit comments