Gcm Response

category Zend
package Zend_Mobile
subpackage Zend_Mobile_Push
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
version $Id$

 Methods

Constructor

__construct(string $responseString = null, \Zend_Mobile_Push_Message_Gcm $message = null) : \Zend_Mobile_Push_Response_Gcm

Parameters

$responseString

string

JSON encoded response

$message

\Zend_Mobile_Push_Message_Gcm

Exceptions

\Zend_Mobile_Push_Exception_ServerUnavailable

Returns

\Zend_Mobile_Push_Response_Gcm

Get Canonical Count

getCanonicalCount() : integer

Returns

integer

Get Failure Count

getFailureCount() : integer

Returns

integer

Get Message

getMessage() : \Zend_Mobile_Push_Message_Gcm

Returns

\Zend_Mobile_Push_Message_Gcm

Get Response

getResponse() : array

Returns

array

Get Singular Result

getResult(integer $flag) : array

Parameters

$flag

integer

one of the RESULT_* flags

Returns

arraysingular array with keys being registration id value is the type of result

Get Results

getResults() : array

Returns

arraymulti dimensional array of: NOTE: key is registration_id if the message is passed. 'registration_id' => array( 'message_id' => 'id', 'error' => 'error', 'registration_id' => 'id' )

Get Success Count

getSuccessCount() : integer

Returns

integer

Set Message

setMessage(\Zend_Mobile_Push_Message_Gcm $message) : \Zend_Mobile_Push_Response_Gcm

Parameters

$message

\Zend_Mobile_Push_Message_Gcm

Returns

\Zend_Mobile_Push_Response_Gcm

Set Response

setResponse(array $response) : \Zend_Mobile_Push_Response_Gcm

Parameters

$response

array

Exceptions

\Zend_Mobile_Push_Exception

Returns

\Zend_Mobile_Push_Response_Gcm

Correlate Message and Result

_correlate() : array

Returns

array

 Properties

 

Canonical registration id count

$_canonicalCnt : integer

Default

 

Failure Count

$_failureCnt : integer

Default

 

Multicast ID

$_id : integer

Default

 

Message

$_message : \Zend_Mobile_Push_Message_Gcm

Default

 

Raw Response

$_response : array

Default

 

Results

$_results : array

Default

 

Success Count

$_successCnt : integer

Default

 Constants

 

RESULT_CANONICAL

RESULT_CANONICAL = 'registration_id' 
 

RESULT_ERROR

RESULT_ERROR = 'error' 
 

RESULT_MESSAGE_ID

RESULT_MESSAGE_ID = 'message_id'