51 $jsonPayload = json_encode($data, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE);
52 $payloadLength = strlen($jsonPayload);
53 if ($payloadLength > self::DEFAULT_PAYLOAD_MAXIMUM_SIZE)
56 $useSenderText =
false;
57 if(array_key_exists(
"senderMessage", $this->customProperties))
59 $useSenderText =
true;
60 $text = $this->customProperties[
"senderMessage"];
63 if ($maxTextLength <= 0)
67 while (strlen(
$text = mb_substr(
$text, 0, --$nTextLen)) > $maxTextLength) ;