dev-master
9999999-dev https://github.com/bureau-va/wordpress-guzzle-wrapperWordpress guzzle wrapper
MIT
The Requires
- guzzlehttp/guzzle ^6.1
- php ~5.6|~7.0
The Development Requires
wordpress api rest maciekpaprocki wordpress-guzzle-wrapper
Wallogit.com
2017 © Pedro Peláez
Wordpress guzzle wrapper
![Software License][ico-license]
![Coverage Status][ico-scrutinizer]
![Total Downloads][ico-downloads], (*1)
Simple helper for working with Guzzle and wordpress rest API, (*2)
Via Composer, (*3)
``` bash $ composer require maciekpaprocki/wordpress-guzzle-wrapper, (*4)
## Usage ### Repositories Repositories are de facto your query builders. Provided with query information they need to return async promise (or whatever wrapped in promise). ### Transformers Transformers are responsible for converting data received from async calls. All the data is transformed using json_decode then if data is object transformers are run on whole data set. If data is array transformers are run on each of the array values. ### Pool Pool is responsible for aggregating three services. 1. Transformers 2. Cache 3. ``` php use BureauVA\WordpressGuzzle\Pool; $pool = new Pool(); $pool->setTransformers(...Transformer Array); $pool->setCachePool(...External Cache Pool); $pool->setPromises(...Promises array);
Yope, so you need to have those ones installed globaly: 1. Composer 2. PHP CS Fixer 3. PHPUNIT, (*5)
then run those lines in empty folder of your choice ``` bash git clone git@github.com:bureau-va/wordpress-guzzle-wrapper.git . touch .git/hooks/pre-commit sudo chmod 777 .git/hooks/pre-commit echo "composer pre-commit" >> .git/hooks/pre-commit, (*6)
this will set up base repo and make sure that before each commit your local tests and cs fixer are used. ## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash $ composer test
The MIT License (MIT). Please see License File for more information., (*7)
Wordpress guzzle wrapper
MIT
wordpress api rest maciekpaprocki wordpress-guzzle-wrapper