Mcfedr\AwsPushBundle\Message\Message
Synopsis
- // constants
- const GCM_NO_COLLAPSE = 'do_not_collapse';
- const APNS_MAX_LENGTH = 2048;
- const GCM_MAX_LENGTH = 4096;
- // members
- private string $text;
- private int $badge;
- private bool $contentAvailable;
- private string $sound;
- private array $custom;
- private array $gcmData;
- private array $admData;
- private array $apnsData;
- private string $collapseKey;
- private int $ttl;
- private boolean $delayWhileIdle;
- // methods
- public void __construct()
- public void setBadge()
- public int getBadge()
- public boolean isContentAvailable()
- public void setContentAvailable()
- public void setCustom()
- public array getCustom()
- public void setSound()
- public string getSound()
- public void setText()
- public string getText()
- public void setCollapseKey()
- public string getCollapseKey()
- public void setDelayWhileIdle()
- public boolean getDelayWhileIdle()
- public void setTtl()
- public int getTtl()
- public void setGcmData()
- public array getGcmData()
- public Message setAdmData()
- public array getAdmData()
- public Message setApnsData()
- public array getApnsData()
- public void jsonSerialize()
- public void __toString()
- private string getApnsJson()
- private string getAdmJson()
- private string getGcmJson()
- private array arrayMergeDeep()
Hierarchy
Implements
Constants
Name | Value |
---|---|
GCM_NO_COLLAPSE | 'do_not_collapse' |
APNS_MAX_LENGTH | 2048 |
GCM_MAX_LENGTH | 4096 |
Members
private
- $admData
—
array
If set, will be sent to ADM, otherwise ['message' => $text] will be sent as part of the data - $apnsData
—
array
If set, will be sent to APNS - $badge
—
int
APNS only - $collapseKey
—
string
GCM and ADM only - $contentAvailable
—
Mcfedr\AwsPushBundle\Message\bool
APNS only Provide this key with a value of 1 to indicate that new content is available. Including this key and value means that when your app is launched in the background or resumed - $custom
—
array
This is the data to send to all services, it will be deep merged with the other data - $delayWhileIdle
—
boolean
GCM only - $gcmData
—
array
If set, will be sent to GCM, otherwise ['message' => $text] will be sent as part of the data - $sound
—
string
APNS only - $text
—
string
The text is automatically trimmed when sending to APNS The text will only be sent to GCM and ADM if no platform specific data is set - $ttl
—
int
GCM only
Methods
private
- arrayMergeDeep() — Merge arrays, deeply
- getAdmJson() — Get the json to send via Amazon Device Messaging
- getApnsJson() — Get the correct apple push notification server json
- getGcmJson() — Get the json to send via Google Cloud Messaging
public
- __construct()
- __toString()
- getAdmData()
- getApnsData()
- getBadge()
- getCollapseKey()
- getCustom()
- getDelayWhileIdle()
- getGcmData()
- getSound()
- getText()
- getTtl()
- isContentAvailable()
- jsonSerialize()
- setAdmData()
- setApnsData()
- setBadge()
- setCollapseKey()
- setContentAvailable()
- setCustom()
- setDelayWhileIdle()
- setGcmData()
- setSound()
- setText()
- setTtl()
History
-
2015-02-02T11:28:00+02:00 (commit #5474a4c)
Author: Yuriy Tarnavskiy (yuriy.tarnavskiy@ekreative.com) / Commiter: Yuriy Tarnavskiy (yuriy.tarnavskiy@ekreative.com)
added 'content-available' key into APNS JSON structure
-
2015-01-26T15:38:45+02:00 (commit #81ee830)
Author: Fred Cox (fred@ekreative.com) / Commiter: Fred Cox (fred@ekreative.com)
Dont set APS values when they are null
-
2014-10-07T22:30:45+03:00 (commit #07916d6)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
Change the namespace name
-
2014-10-07T22:03:30+03:00 (commit #49c2c63)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
Update the max size of APNS. Also check max size of GCM
-
2014-05-08T13:14:51+03:00 (commit #991eb16)
Author: Fred Cox (fred@ekreative.com) / Commiter: Fred Cox (fred@ekreative.com)
Codestyle changes
-
2014-04-05T22:20:35+03:00 (commit #d960d04)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
use elispses when cutting pushes
-
2014-04-05T15:20:54+03:00 (commit #cb4f1a4)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
Add option for APNS specific data
-
2014-03-16T22:17:07+02:00 (commit #a916b26)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
Change the GCM and ADM format a bit
-
2014-02-25T17:05:51+02:00 (commit #d98d4e3)
Author: Fred Cox (fred@ekreative.com) / Commiter: Fred Cox (fred@ekreative.com)
Use custom array_merge_deep do that its possbile to replace values within the aps array
-
2014-02-18T23:00:14+02:00 (commit #7b74c15)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
Add a comment about strlen
-
2014-01-31T14:32:44+02:00 (commit #9720e13)
Author: Fred Cox (fred@ekreative.com) / Commiter: Fred Cox (fred@ekreative.com)
Add some documentation and reformat to PSR1/2 standards
-
2013-12-12T22:25:19+02:00 (commit #37d899c)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
Handle longer messages on APNS
-
2013-12-12T15:20:53+02:00 (commit #9f29ed0)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
add tostring method for message
-
2013-12-12T13:36:46+02:00 (commit #4c9d46d)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
Rename the namespace to mcfedr
-
2013-12-11T13:28:08+02:00 (commit #9279826)
Author: Fred Cox (mcfedr@gmail.com) / Commiter: Fred Cox (mcfedr@gmail.com)
The aws push bundle