RateLimitPolicy
final class RateLimitPolicy (View source)
Defines a strictly positive maximum number of attempts within one fixed window.
Methods
__construct(int $attempts, int $windowSeconds)
Validates the fixed-window limits used by a limiter operation.
attempts()
Returns the maximum number of attempts represented by this policy.
int
Returns the fixed window duration in seconds.
int
Details
__construct
__construct(int $attempts, int $windowSeconds)
Validates the fixed-window limits used by a limiter operation.
attempts
int
attempts()
Returns the maximum number of attempts represented by this policy.
windowSeconds
int
windowSeconds()
Returns the fixed window duration in seconds.