RateLimitResult
in package
FinalYes
Outcome of a rate-limit check.
Table of Contents
Properties
- $allowed : bool
- $remaining : int
- $reservationKey : string|null
- $retryAfterSeconds : int
Methods
- __construct() : mixed
Properties
$allowed read-only
public
bool
$allowed
$remaining read-only
public
int
$remaining
$reservationKey read-only
public
string|null
$reservationKey
= null
$retryAfterSeconds read-only
public
int
$retryAfterSeconds
Methods
__construct()
public
__construct(bool $allowed, int $remaining, int $retryAfterSeconds[, string|null $reservationKey = null ]) : mixed
Parameters
- $allowed : bool
-
Whether the request is within the limit
- $remaining : int
-
Remaining attempts in the current window
- $retryAfterSeconds : int
-
Seconds until the window resets when blocked
- $reservationKey : string|null = null