public function write($binaryMessage)
    {
        if (strlen($binaryMessage) > self::PAYLOAD_MAX_BYTES) {
            throw new \InvalidArgumentException(
                sprintf('The maximum size allowed for a notification payload is %s bytes; Apple Push Notification Service refuses any notification that exceeds this limit.', self::PAYLOAD_MAX_BYTES)
            );
        }

        return fwrite($this->getApnsResource(), $binaryMessage);
    }
public function write($binaryMessage)
    {
        if (strlen($binaryMessage) > self::PAYLOAD_MAX_BYTES) {
            throw new \InvalidArgumentException(
                sprintf('The maximum size allowed for a notification payload is %s bytes; Apple Push Notification Service refuses any notification that exceeds this limit.', self::PAYLOAD_MAX_BYTES)
            );
        }

        return fwrite($this->getApnsResource(), $binaryMessage);
    }
public function write ( $ binaryMessage ) { if ( strlen ( $ binaryMessage ) > self :: PAYLOAD_MAX_BYTES ) { throw new \ InvalidArgumentException ( sprintf ( 'The maximum size allowed for a notification payload is %s bytes; Apple Push Notification Service refuses any notification that exceeds this limit.' , self :: PAYLOAD_MAX_BYTES ) ) ; } return fwrite ( $ this -> getApnsResource ( ) , $ binaryMessage ) ; }
Writes a binary message to apns.

@param string $binaryMessage
@return integer Returns the number of bytes written, or FALSE on error.
Writes a binary message to apns .