54 if(!empty($alertData))
67 if (isset($this->category))
72 if (isset($this->badge) && $this->badge >= 0)
76 if (isset($this->sound) && $this->sound <>
'')
81 if (is_array($this->customProperties))
83 foreach ($this->customProperties as $sPropertyName => $mPropertyValue)
85 $aPayload[$sPropertyName] = $mPropertyValue;
94 $sJSONPayload = str_replace(
95 '"' . self::APPLE_RESERVED_NAMESPACE .
'":[]',
96 '"' . self::APPLE_RESERVED_NAMESPACE .
'":{}',
97 json_encode($this->
_getPayload(), static::JSON_OPTIONS)
99 $nJSONPayloadLen = strlen($sJSONPayload);
100 if ($nJSONPayloadLen <= $this->payloadMaxSize)
102 return $sJSONPayload;
104 if (!$this->_bAutoAdjustLongPayload)
110 $useSenderText =
false;
111 if(array_key_exists(
"senderMessage", $this->customProperties))
113 $useSenderText =
true;
114 $text = $this->customProperties[
"senderMessage"];
117 if ($nMaxTextLen <= 0)
122 while (strlen(
$text) > $nMaxTextLen)