guzzle/guzzle — pull request #355 by Danack (2013-06-23 17:25:14+00:00)
Title: Allow Guzzle client to manage ResponseObject creation

Allow Guzzle client to manage ResponseObject creation rather than requiring every object implement ResponseClassInterface.

Hi Michael,

This change removes the strong coupling between Guzzle and the actual domain objects created by the API, as the domain objects no longer have to implement ResponseClassInterface.

You said, you'd prefer these things to be discuessed first. I did ask at: https://groups.google.com/forum/?hl=en#!topic/guzzle/C6d2i1mpGec
but have no response hence the pull request, so have gone ahead and created a pull-request.

An example implementation is at https://github.com/Danack/FlickrGuzzle/blob/master/src/Intahwebz/FlickrGuzzle/FlickrGuzzleClient.php where you can see why having the object creation code outside of the objects is a lot nicer for some APIs.

cheers
Dan