class Gateway extends SslSocket

Constants

SEND_INTERVAL

Minimum interval between sending two messages in microseconds (Internal use)

READ_TIMEOUT

Minimum interval to wait for a response (Internal use)

ERROR_RESPONSE_COMMAND

Command APNS sends back on error (Internal use)

ERROR_RESPONSE_SIZE

Size of the APNS error response (Internal use)

MESSAGE_ENVELOPE_STORE_PREFIX

Prefix used to save message envelopes to the store (Internal use)

Methods

__construct(Certificate $certificate)

Construct Gateway

setLogger(LoggerInterface $logger)

Sets a logger instance on the object

from SslSocket
getCertificate()

Get the certificate used with this connection

from SslSocket
queue(Message $message)

Queue a message for sending

int
getQueueLength()

Count of all queued messages

flush()

Send all queued messages

Details

at line 32
__construct(Certificate $certificate)

Construct Gateway

Parameters

Certificate $certificate The certificate to use when connecting to APNS

in SslSocket at line 48
setLogger(LoggerInterface $logger)

Sets a logger instance on the object

Parameters

LoggerInterface $logger

in SslSocket at line 58
Certificate getCertificate()

Get the certificate used with this connection

Return Value

Certificate

at line 48
MessageEnvelope queue(Message $message)

Queue a message for sending

Parameters

Message $message The message object to queue for sending

Return Value

MessageEnvelope

at line 71
int getQueueLength()

Count of all queued messages

Return Value

int

at line 79
flush()

Send all queued messages