RoundRobinTransport
in package
implements
TransportInterface
Uses several Transports using a round robin algorithm.
Tags
Interfaces, Classes, Traits and Enums
- TransportInterface
- Interface for all mailer transports.
Table of Contents
- $cursor : mixed
- $deadTransports : mixed
- $retryPeriod : mixed
- $transports : mixed
- __construct() : mixed
- __toString() : string
- send() : SentMessage|null
- getNameSymbol() : string
- getNextTransport() : TransportInterface|null
- Rotates the transport list around and returns the first instance.
- isTransportDead() : bool
- moveCursor() : int
Properties
$cursor
private
mixed
$cursor
= 0
$deadTransports
private
mixed
$deadTransports
$retryPeriod
private
mixed
$retryPeriod
$transports
private
mixed
$transports
= []
Methods
__construct()
public
__construct(array<string|int, TransportInterface> $transports[, int $retryPeriod = 60 ]) : mixed
Parameters
- $transports : array<string|int, TransportInterface>
- $retryPeriod : int = 60
Return values
mixed —__toString()
public
__toString() : string
Return values
string —send()
public
send(RawMessage $message[, Envelope $envelope = null ]) : SentMessage|null
Parameters
- $message : RawMessage
- $envelope : Envelope = null
Return values
SentMessage|null —getNameSymbol()
protected
getNameSymbol() : string
Return values
string —getNextTransport()
Rotates the transport list around and returns the first instance.
protected
getNextTransport() : TransportInterface|null
Return values
TransportInterface|null —isTransportDead()
protected
isTransportDead(TransportInterface $transport) : bool
Parameters
- $transport : TransportInterface
Return values
bool —moveCursor()
private
moveCursor(int $cursor) : int
Parameters
- $cursor : int