AbstractApiTransport
extends AbstractHttpTransport
in package
Tags
Table of Contents
- $client : mixed
- $host : mixed
- $port : mixed
- $dispatcher : mixed
- $lastSent : mixed
- $logger : mixed
- $rate : mixed
- __construct() : mixed
- send() : SentMessage|null
- setHost() : $this
- setMaxPerSecond() : self
- Sets the maximum number of messages to send per second (0 to disable).
- setPort() : $this
- doSend() : void
- doSendApi() : ResponseInterface
- doSendHttp() : ResponseInterface
- getLogger() : LoggerInterface
- getRecipients() : array<string|int, mixed>
- stringifyAddresses() : array<string|int, string>
- checkThrottling() : mixed
Properties
$client
protected
mixed
$client
$host
protected
mixed
$host
$port
protected
mixed
$port
$dispatcher
private
mixed
$dispatcher
$lastSent
private
mixed
$lastSent
= 0
$logger
private
mixed
$logger
$rate
private
mixed
$rate
= 0
Methods
__construct()
public
__construct([EventDispatcherInterface $dispatcher = null ][, LoggerInterface $logger = null ]) : mixed
Parameters
- $dispatcher : EventDispatcherInterface = null
- $logger : LoggerInterface = null
Return values
mixed —send()
public
send(RawMessage $message[, Envelope $envelope = null ]) : SentMessage|null
Parameters
- $message : RawMessage
- $envelope : Envelope = null
Return values
SentMessage|null —setHost()
public
setHost(string|null $host) : $this
Parameters
- $host : string|null
Return values
$this —setMaxPerSecond()
Sets the maximum number of messages to send per second (0 to disable).
public
setMaxPerSecond(float $rate) : self
Parameters
- $rate : float
Return values
self —setPort()
public
setPort(int|null $port) : $this
Parameters
- $port : int|null
Return values
$this —doSend()
protected
abstract doSend(SentMessage $message) : void
Parameters
- $message : SentMessage
Return values
void —doSendApi()
protected
abstract doSendApi(SentMessage $sentMessage, Email $email, Envelope $envelope) : ResponseInterface
Parameters
- $sentMessage : SentMessage
- $email : Email
- $envelope : Envelope
Return values
ResponseInterface —doSendHttp()
protected
doSendHttp(SentMessage $message) : ResponseInterface
Parameters
- $message : SentMessage
Return values
ResponseInterface —getLogger()
protected
getLogger() : LoggerInterface
Return values
LoggerInterface —getRecipients()
protected
getRecipients(Email $email, Envelope $envelope) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed> —stringifyAddresses()
protected
stringifyAddresses(array<string|int, Address> $addresses) : array<string|int, string>
Parameters
- $addresses : array<string|int, Address>
Return values
array<string|int, string> —checkThrottling()
private
checkThrottling() : mixed