public function getBinaryMessage()
    {
        $encodedPayload = $this->jsonEncode($this->payload->getPayload());

        return chr(0).
               chr(0).
               chr(32).
               pack('H*', $this->deviceToken).
               chr(0).chr(strlen($encodedPayload)).
               $encodedPayload;
    }
public function getBinaryMessage()
    {
        $encodedPayload = $this->jsonEncode($this->payload->getPayload());

        return chr(0).
               chr(0).
               chr(32).
               pack('H*', $this->deviceToken).
               chr(0).chr(strlen($encodedPayload)).
               $encodedPayload;
    }
public function getBinaryMessage ( ) { $ encodedPayload = $ this -> jsonEncode ( $ this -> payload -> getPayload ( ) ) ; return chr ( 0 ) . chr ( 0 ) . chr ( 32 ) . pack ( 'H*' , $ this -> deviceToken ) . chr ( 0 ) . chr ( strlen ( $ encodedPayload ) ) . $ encodedPayload ; }
Returns a binary message that the Apple Push Notification Service understands.

@return string $binaryMessage
Returns a binary message that the Apple Push Notification Service understands .