protected function constructMessageBody(BlackberryMessage $message, $separator)
    {
        $data = "";
        $messageID = microtime(true);

        $data .= "--" . $separator . "\r\n";
        $data .= "Content-Type: application/xml; charset=UTF-8\r\n\r\n";
        $data .= $this->getXMLBody($message, $messageID) . "\r\n";
        $data .= "--" . $separator . "\r\n";
        $data .= "Content-Type: text/plain\r\n";
        $data .= "Push-Message-ID: {$messageID}\r\n\r\n";
        if (is_array($message->getMessageBody())) {
            $data .= json_encode($message->getMessageBody());
        } else {
            $data .= $message->getMessageBody();
        }
        $data .= "\r\n";
        $data .= "--" . $separator . "--\r\n";

        return $data;
    }
protected function constructMessageBody(BlackberryMessage $message, $separator)
    {
        $data = "";
        $messageID = microtime(true);

        $data .= "--" . $separator . "\r\n";
        $data .= "Content-Type: application/xml; charset=UTF-8\r\n\r\n";
        $data .= $this->getXMLBody($message, $messageID) . "\r\n";
        $data .= "--" . $separator . "\r\n";
        $data .= "Content-Type: text/plain\r\n";
        $data .= "Push-Message-ID: {$messageID}\r\n\r\n";
        if (is_array($message->getMessageBody())) {
            $data .= json_encode($message->getMessageBody());
        } else {
            $data .= $message->getMessageBody();
        }
        $data .= "\r\n";
        $data .= "--" . $separator . "--\r\n";

        return $data;
    }
protected function constructMessageBody ( BlackberryMessage $ message , $ separator ) { $ data = "" ; $ messageID = microtime ( true ) ; $ data .= "--" . $ separator . "\r\n" ; $ data .= "Content-Type: application/xml; charset=UTF-8\r\n\r\n" ; $ data .= $ this -> getXMLBody ( $ message , $ messageID ) . "\r\n" ; $ data .= "--" . $ separator . "\r\n" ; $ data .= "Content-Type: text/plain\r\n" ; $ data .= "Push-Message-ID: {$messageID}\r\n\r\n" ; if ( is_array ( $ message -> getMessageBody ( ) ) ) { $ data .= json_encode ( $ message -> getMessageBody ( ) ) ; } else { $ data .= $ message -> getMessageBody ( ) ; } $ data .= "\r\n" ; $ data .= "--" . $ separator . "--\r\n" ; return $ data ; }
Builds the actual body of the message

@param  \RMS\PushNotificationsBundle\Message\BlackberryMessage $message
@param $separator
@return string
Builds the actual body of the message