Mobile/Push/Message/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_Message_Gcm

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

Properties

>VPropertyprotectedarray $_data = array()
Data key value pairs
Default valuearray()Details
Type
array
>VPropertyprotectedboolean $_delay = false
Delay while idle
Default valuefalseDetails
Type
boolean
>VPropertyprotectedarray $_token = array()
Tokens
Default valuearray()Details
Type
array
>VPropertyprotectedint $_ttl = 2419200
Time to live in seconds
Default value2419200Details
Type
int

Methods

methodpublicaddData(string $key, string $value) : \Zend_Mobile_Push_Message_Gcm

Add Data

Parameters
NameTypeDescription
$keystring
$valuestring
Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
Throws
ExceptionDescription
\Zend_Mobile_Push_Message_Exception
methodpublicaddToken(string $token) : \Zend_Mobile_Push_Message_Gcm

Add a Token

Parameters
NameTypeDescription
$tokenstring
Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
Throws
ExceptionDescription
\Zend_Mobile_Push_Message_Exception
methodpublicclearData() : \Zend_Mobile_Push_Message_Gcm

Clear Data

Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
methodpublicclearToken() : \Zend_Mobile_Push_Message_Gcm

Clear Tokens

Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
methodpublicgetData() : array

Get Data

Returns
TypeDescription
array
methodpublicgetDelayWhileIdle() : boolean

Get Delay While Idle

Returns
TypeDescription
boolean
methodpublicgetToken() : void

Returns
TypeDescription
void
Details
Magic
 
Method
 
methodpublicgetTtl() : int

Get time to live

Returns
TypeDescription
int
methodpublicsetData(array $data) : \Zend_Mobile_Push_Message_Gcm

Set Data

Parameters
NameTypeDescription
$dataarray
Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
Throws
ExceptionDescription
\Zend_Mobile_Push_Message_Exception
methodpublicsetDelayWhileIdle(boolean $delay) : \Zend_Mobile_Push_Message_Gcm

Set Delay While Idle

Parameters
NameTypeDescription
$delayboolean
Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
Throws
ExceptionDescription
\Zend_Mobile_Push_Message_Exception
methodpublicsetToken(string | array $token) : \Zend_Mobile_Push_Message_Gcm

Set Token

Parameters
NameTypeDescription
$tokenstring | array
Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
Throws
ExceptionDescription
\Zend_Mobile_Push_Message_Exception
methodpublicsetTtl(int $secs) : \Zend_Mobile_Push_Message_Gcm

Set time to live.

Parameters
NameTypeDescription
$secsint
Returns
TypeDescription
\Zend_Mobile_Push_Message_Gcm
methodpublictoJson() : string

To Json utility method Takes the data and properly assigns it to a json encoded array to match the Gcm format.

Returns
TypeDescription
string
methodpublicvalidate() : boolean

Validate this is a proper Gcm message Does not validate size.

Returns
TypeDescription
boolean
Documentation was generated by phpDocumentor 2.2.0 .