diff -r 5a6b6e770365 -r 68c69c656a2c web/lib/Zend/Mobile/Push/Gcm.php --- a/web/lib/Zend/Mobile/Push/Gcm.php Thu May 07 15:10:09 2015 +0200 +++ b/web/lib/Zend/Mobile/Push/Gcm.php Thu May 07 15:16:02 2015 +0200 @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -38,7 +38,7 @@ * @category Zend * @package Zend_Mobile * @subpackage Zend_Mobile_Push - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ @@ -53,7 +53,7 @@ /** * Http Client * - * @var Client + * @var Zend_Http_Client */ protected $_httpClient; @@ -120,9 +120,13 @@ /** * Send Message * - * @param Zend_Mobile_Push_Message_Gcm $message + * @param Zend_Mobile_Push_Message_Abstract $message + * @throws Zend_Http_Client_Exception + * @throws Zend_Mobile_Push_Exception + * @throws Zend_Mobile_Push_Exception_InvalidAuthToken + * @throws Zend_Mobile_Push_Exception_InvalidPayload + * @throws Zend_Mobile_Push_Exception_ServerUnavailable * @return Zend_Mobile_Push_Response_Gcm - * @throws Zend_Mobile_Push_Exception */ public function send(Zend_Mobile_Push_Message_Abstract $message) { @@ -136,14 +140,6 @@ $client->setUri(self::SERVER_URI); $client->setHeaders('Authorization', 'key=' . $this->getApiKey()); - $json = array('registration_ids' => $message->getToken()); - if ($data = $message->getData()) { - $json['data'] = $data; - } - if ($id = $message->getId()) { - $json['id'] = $id; - } - $response = $client->setRawData($message->toJson(), 'application/json') ->request('POST'); $this->close();