Mobile/Push/Message/Gcm.php

Show: inherited
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 [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2011 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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id$  

Properties

Propertyprotectedarray $_data = array()

Data key value pairs

Default valuearray()Details
Type
array
Propertyprotectedboolean $_delay = false

Delay while idle

Default valuefalseDetails
Type
boolean
Propertyprotected\scalar $_id =
inherited

Id

Inherited from: \Zend_Mobile_Push_Message_Abstract::$$_id
Details
Type
\scalar
Inherited_from
\Zend_Mobile_Push_Message_Abstract::$$_id  
Propertyprotectedarray $_token = array()

Tokens

Default valuearray()Details
Type
array
Propertyprotectedint $_ttl = 0

Time to live in seconds

Default value0Details
Type
int

Methods

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

Add Data

Parameters
Name Type Description
$key string
$value string
Returns
Type Description
\Zend_Mobile_Push_Message_Gcm
Throws
Exception Description
\Zend_Mobile_Push_Message_Exception
methodpublicaddToken(string $token) : \Zend_Mobile_Push_Message_Gcm

Add a Token

Parameters
Name Type Description
$token string
Returns
Type Description
\Zend_Mobile_Push_Message_Gcm
Throws
Exception Description
\Zend_Mobile_Push_Message_Exception
methodpublicclearData() : \Zend_Mobile_Push_Message_Gcm

Clear Data

Returns
Type Description
\Zend_Mobile_Push_Message_Gcm
methodpublicclearToken() : \Zend_Mobile_Push_Message_Gcm

Clear Tokens

Returns
Type Description
\Zend_Mobile_Push_Message_Gcm
methodpublicgetData() : array

Get Data

Returns
Type Description
array
methodpublicgetDelayWhileIdle() : boolean

Get Delay While Idle

Returns
Type Description
boolean
methodpublicgetId() : \scalar
inherited

Get Message ID

Inherited from: \Zend_Mobile_Push_Message_Abstract::getId()
Returns
Type Description
\scalar
methodpublicgetToken() : string
inherited

Get Token

Inherited from: \Zend_Mobile_Push_Message_Abstract::getToken()
Returns
Type Description
string
methodpublicgetToken() : array

Returns
Type Description
array
Details
Magic
 
Method
 
methodpublicgetTtl() : int

Get time to live

Returns
Type Description
int
methodpublicsetData(array $data) : \Zend_Mobile_Push_Message_Gcm

Set Data

Parameters
Name Type Description
$data array
Returns
Type Description
\Zend_Mobile_Push_Message_Gcm
Throws
Exception Description
\Zend_Mobile_Push_Message_Exception
methodpublicsetDelayWhileIdle(boolean $delay) : \Zend_Mobile_Push_Message_Gcm

Set Delay While Idle

Parameters
Name Type Description
$delay boolean
Returns
Type Description
\Zend_Mobile_Push_Message_Gcm
Throws
Exception Description
\Zend_Mobile_Push_Message_Exception
methodpublicsetId(\scalar $id) : \Zend_Mobile_Push_Message_Abstract
inherited

Set Message ID

Inherited from: \Zend_Mobile_Push_Message_Abstract::setId()
Parameters
Name Type Description
$id \scalar
Returns
Type Description
\Zend_Mobile_Push_Message_Abstract
Throws
Exception Description
\Exception
methodpublicsetOptions(array $options) : \Zend_Mobile_Push_Message_Abstract
inherited

Set Options

Inherited from: \Zend_Mobile_Push_Message_Abstract::setOptions()
Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Mobile_Push_Message_Abstract
Throws
Exception Description
\Zend_Mobile_Push_Message_Exception
methodpublicsetToken(string | array $token) : \Zend_Mobile_Push_Message_Gcm

Set Token

Parameters
Name Type Description
$token string | array
Returns
Type Description
\Zend_Mobile_Push_Message_Gcm
Throws
Exception Description
\Zend_Mobile_Push_Message_Exception
methodpublicsetTtl(int $secs) : \Zend_Mobile_Push_Message_Gcm

Set time to live If $secs is set to 0 it will be handled as not being set.

Parameters
Name Type Description
$secs int
Returns
Type Description
\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
Type Description
string
methodpublicvalidate() : boolean

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

Returns
Type Description
boolean
Documentation was generated by phpDocumentor 2.0.0a8.