final class CooldownResult implements Decision

Methods

__construct(bool $allowed, int $retryAfterMicroseconds)

Create a new cooldown result.

bool
allowed()

Determine if the operation was allowed.

bool
denied()

Determine if the operation was denied.

int
retryAfter()

Get the number of seconds until the operation may be retried.

Details

at line 15
__construct(bool $allowed, int $retryAfterMicroseconds)

Create a new cooldown result.

Parameters

bool $allowed
int $retryAfterMicroseconds

at line 35
bool allowed()

Determine if the operation was allowed.

Return Value

bool

at line 43
bool denied()

Determine if the operation was denied.

Return Value

bool

at line 51
int retryAfter()

Get the number of seconds until the operation may be retried.

Return Value

int