Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T16:10:03.000Z (almost 8 years ago)
- Last Synced: 2024-08-12T09:14:25.006Z (3 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).[![Build Status](https://travis-ci.org/mcg-web/promise-factory.svg?branch=master)](https://travis-ci.org/mcg-web/promise-factory)
[![Coverage Status](https://coveralls.io/repos/github/mcg-web/promise-factory/badge.svg?branch=master)](https://coveralls.io/github/mcg-web/promise-factory?branch=master)
[![Latest Stable Version](https://poser.pugx.org/mcg-web/promise-factory/version)](https://packagist.org/packages/mcg-web/promise-factory)
[![License](https://poser.pugx.org/mcg-web/promise-factory/license)](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.