Lusitanian/PHPoAuthLib — pull request #90 by popthestack (2013-08-29 01:25:02+00:00)
Title: Add cURL HTTP client

This pull request makes the following changes:

* Add: `Common\Http\Client\AbstractClient`
* Add: `Common\Http\Client\CurlClient`, which extends `AbstractClient`.
* Modify: `Common\Http\Client\StreamClient` to extend `AbstractClient`.
* Add: `ServiceFactory::setHttpClient` class method.
* Remove: `ServiceFactory::__construct`. HTTP client is now set via `setHttpClient`.
* Remove: `$httpClientMap` from `ServiceFactory` as it's no longer necessary. `setHttpClient`
enforces that the client implements `Common\Http\Client\ClientInterface` via type hinting.
* Modify: `ServiceFactory::createService` to set a `StreamClient` instance as the HTTP client if no HTTP client has been set. This is for backwards compatibility.

I'm not crazy about the backwards compatibility hack, but it keeps the library functioning the way it did before.