class Sender implements LoggerAwareInterface

Methods

__construct()

Construct Sender

setGatewayFactory(GatewayFactory $gatewayFactory)

Set the gateway factory to use for creating connections to the APNS gateway

getGatewayFactory()

Get the current gateway factory

setLogger(LoggerInterface $logger)

Sets a logger instance on the object

send(Message $message)

Queues a message and flushes the gateway connection it must be send over immediately Note: If you send multiple messages, queue as many as possible and flush them at once for maximum performance

queue(Message $message)

Queue a message on the correct APNS gateway connection

int
getQueueLength()

Count of all queued messages

flush(Certificate $certificate = null)

Send all queued messages

Details

at line 18
__construct()

Construct Sender

at line 30
setGatewayFactory(GatewayFactory $gatewayFactory)

Set the gateway factory to use for creating connections to the APNS gateway

Parameters

GatewayFactory $gatewayFactory The gateway factory to use

at line 40
GatewayFactory getGatewayFactory()

Get the current gateway factory

Return Value

GatewayFactory

at line 50
setLogger(LoggerInterface $logger)

Sets a logger instance on the object

Parameters

LoggerInterface $logger

at line 67
MessageEnvelope send(Message $message)

Queues a message and flushes the gateway connection it must be send over immediately Note: If you send multiple messages, queue as many as possible and flush them at once for maximum performance

Parameters

Message $message The message to send

Return Value

MessageEnvelope

at line 84
MessageEnvelope queue(Message $message)

Queue a message on the correct APNS gateway connection

Parameters

Message $message

Return Value

MessageEnvelope

at line 98
int getQueueLength()

Count of all queued messages

Return Value

int

at line 115
flush(Certificate $certificate = null)

Send all queued messages

Parameters

Certificate $certificate When given only the gateway connection for the given certificate is flushed