https://github.com/mcg-web/promise-factory
This library tries to create a simple promise factory standard while waiting for a psr. It Comes out of the box with factory for ReactPhp/Promise and Guzzle/Promises.
https://github.com/mcg-web/promise-factory
Last synced: 4 months ago
JSON representation
This library tries to create a simple promise factory standard while waiting for a psr. It Comes out of the box with factory for ReactPhp/Promise and Guzzle/Promises.
- Host: GitHub
- URL: https://github.com/mcg-web/promise-factory
- Owner: mcg-web
- License: mit
- Created: 2016-11-13T13:52:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T16:10:03.000Z (over 8 years ago)
- Last Synced: 2025-01-23T02:34:09.508Z (5 months ago)
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# PromiseFactory
This library tries to create a simple promise factory standard while waiting for a psr.
It Comes out of the box with factory for [ReactPhp/Promise](https://github.com/reactphp/promise) and [Guzzle/Promises](https://github.com/guzzle/promises).[](https://travis-ci.org/mcg-web/promise-factory)
[](https://coveralls.io/github/mcg-web/promise-factory?branch=master)
[](https://packagist.org/packages/mcg-web/promise-factory)
[](https://packagist.org/packages/mcg-web/promise-factory)## Getting Started
First, install PromiseFactory using composer.
```sh
composer require "mcg-web/promise-factory"
```Optional to use Guzzle:
```sh
composer require "guzzlehttp/promises"
```Optional to use ReactPhp:
```sh
composer require "react/promise"
```## Supported Factory
*Guzzle*: `McGWeb\PromiseFactory\Factory\GuzzleHttpPromiseFactory`
*ReactPhp*: `McGWeb\PromiseFactory\Factory\ReactPromiseFactory`
To use a custom Promise lib you can implement `McGWeb\PromiseFactory\PromiseFactoryInterface`
## License
McGWeb/PromiseFactory is released under the [MIT](https://github.com/mcg-web/promise-factory/blob/master/LICENSE) license.