Ph3nol/NotificationPusher — pull request #21 by dcelasun (2013-10-02 12:15:00+00:00)
Title: Allow custom Zend Http Clients to be used with GCM

As discussed [here](https://github.com/Ph3nol/NotificationPusher/issues/20), this commit introduces support for overriding the default Http Client used in the GCM adapter.

However, a user-supplied `Zend\Http\Client` instance would introduce a dependency on `Zend\Http` for the user's application. We should not force that, so I introduced an additional method - `setAdapterParameters()` - that will simply pass on configuration parameters to the existing adapter (and create a new adapter if none exists).

Sample usage scenario:

/** @var \Sly\NotificationPusher\Adapter\Gcm $gcm */
$gcm = new Gcm(['apiKey' => ANDROID_GCM_API_KEY]);

$gcm->setAdapterParameters(['sslverifypeer' => false]);