AbstractApiTransport
extends AbstractHttpTransport
in package
AbstractYes
Tags
Table of Contents
Properties
- $client : mixed
- $host : mixed
- $port : mixed
- $dispatcher : mixed
- $lastSent : mixed
- $logger : mixed
- $rate : mixed
Methods
- __construct() : mixed
- send() : SentMessage|null
- setHost() : $this
- setMaxPerSecond() : $this
- 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([HttpClientInterface|null $client = null ][, EventDispatcherInterface|null $dispatcher = null ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $client : HttpClientInterface|null = null
- $dispatcher : EventDispatcherInterface|null = null
- $logger : LoggerInterface|null = null
send()
public
send(RawMessage $message[, Envelope|null $envelope = null ]) : SentMessage|null
Parameters
- $message : RawMessage
- $envelope : Envelope|null = null
Return values
SentMessage|nullsetHost()
public
setHost(string|null $host) : $this
Parameters
- $host : string|null
Return values
$thissetMaxPerSecond()
Sets the maximum number of messages to send per second (0 to disable).
public
setMaxPerSecond(float $rate) : $this
Parameters
- $rate : float
Return values
$thissetPort()
public
setPort(int|null $port) : $this
Parameters
- $port : int|null
Return values
$thisdoSend()
protected
doSend(SentMessage $message) : void
Parameters
- $message : SentMessage
doSendApi()
protected
abstract doSendApi(SentMessage $sentMessage, Email $email, Envelope $envelope) : ResponseInterface
Parameters
- $sentMessage : SentMessage
- $email : Email
- $envelope : Envelope
Return values
ResponseInterfacedoSendHttp()
protected
doSendHttp(SentMessage $message) : ResponseInterface
Parameters
- $message : SentMessage
Return values
ResponseInterfacegetLogger()
protected
getLogger() : LoggerInterface
Return values
LoggerInterfacegetRecipients()
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