Mobile/Push/Response/Gcm.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Mobile  
Subpackage
Zend_Mobile_Push  
Version
$Id$  

\Zend_Mobile_Push_Response_Gcm

Package: Zend_Mobile\Zend_Mobile_Push
Gcm Response
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id$  

Constants

>VConstant  RESULT_MESSAGE_ID = 'message_id'
>VConstant  RESULT_ERROR = 'error'
>VConstant  RESULT_CANONICAL = 'registration_id'

Properties

>VPropertyprotectedint $_canonicalCnt
Canonical registration id count
Details
Type
int
>VPropertyprotectedint $_failureCnt
Failure Count
Details
Type
int
>VPropertyprotectedint $_id
Multicast ID
Details
Type
int
>VPropertyprotected\Zend_Mobile_Push_Message_Gcm $_message
Message
>VPropertyprotectedarray $_response
Raw Response
Details
Type
array
>VPropertyprotectedarray $_results
Results
Details
Type
array
>VPropertyprotectedint $_successCnt
Success Count
Details
Type
int

Methods

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

Constructor

Parameters
NameTypeDescription
$responseStringstring

JSON encoded response

$message\Zend_Mobile_Push_Message_Gcm
Returns
TypeDescription
\Zend_Mobile_Push_Response_Gcm
Throws
ExceptionDescription
\Zend_Mobile_Push_Exception_ServerUnavailable
methodprotected_correlate() : array

Correlate Message and Result

Returns
TypeDescription
array
methodpublicgetCanonicalCount() : int

Get Canonical Count

Returns
TypeDescription
int
methodpublicgetFailureCount() : int

Get Failure Count

Returns
TypeDescription
int
methodpublicgetMessage() : \Zend_Mobile_Push_Message_Gcm

Get Message

Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
methodpublicgetResponse() : array

Get Response

Returns
TypeDescription
array
methodpublicgetResult(int $flag) : array

Get Singular Result

Parameters
NameTypeDescription
$flagint

one of the RESULT_* flags

Returns
TypeDescription
arraysingular array with keys being registration id value is the type of result
methodpublicgetResults() : array

Get Results

Returns
TypeDescription
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' )
methodpublicgetSuccessCount() : int

Get Success Count

Returns
TypeDescription
int
methodpublicsetMessage(\Zend_Mobile_Push_Message_Gcm $message) : \Zend_Mobile_Push_Response_Gcm

Set Message

Parameters
NameTypeDescription
$message\Zend_Mobile_Push_Message_Gcm
Returns
TypeDescription
\Zend_Mobile_Push_Response_Gcm
methodpublicsetResponse(array $response) : \Zend_Mobile_Push_Response_Gcm

Set Response

Parameters
NameTypeDescription
$responsearray
Returns
TypeDescription
\Zend_Mobile_Push_Response_Gcm
Documentation was generated by phpDocumentor 2.2.0 .