SubscribeRequest
extends PendingMessage
in package
Represents a pending subscribe request.
Table of Contents
- $lastSentAt : DateTime
- $messageId : int
- $sendingAttempts : int
- $subscriptions : array<string|int, mixed>
- __construct() : mixed
- Creates a new subscribe request message.
- getLastSentAt() : DateTime
- Returns the date time when the message was last sent.
- getMessageId() : int
- Returns the message identifier.
- getSendingAttempts() : int
- Returns the number of times the message has been sent.
- getSubscriptions() : array<string|int, Subscription>
- Returns the subscriptions in this request.
- incrementSendingAttempts() : static
- Increments the sending attempts by one.
- setLastSentAt() : static
- Sets the date time when the message was last sent.
Properties
$lastSentAt
private
DateTime
$lastSentAt
$messageId
private
int
$messageId
$sendingAttempts
private
int
$sendingAttempts
= 1
$subscriptions
private
array<string|int, mixed>
$subscriptions
Methods
__construct()
Creates a new subscribe request message.
public
__construct(int $messageId, array<string|int, Subscription> $subscriptions) : mixed
Parameters
- $messageId : int
- $subscriptions : array<string|int, Subscription>
Return values
mixed —getLastSentAt()
Returns the date time when the message was last sent.
public
getLastSentAt() : DateTime
Return values
DateTime —getMessageId()
Returns the message identifier.
public
getMessageId() : int
Return values
int —getSendingAttempts()
Returns the number of times the message has been sent.
public
getSendingAttempts() : int
Return values
int —getSubscriptions()
Returns the subscriptions in this request.
public
getSubscriptions() : array<string|int, Subscription>
Return values
array<string|int, Subscription> —incrementSendingAttempts()
Increments the sending attempts by one.
public
incrementSendingAttempts() : static
Return values
static —setLastSentAt()
Sets the date time when the message was last sent.
public
setLastSentAt([DateTime|null $value = null ]) : static
Parameters
- $value : DateTime|null = null