trait HasRateLimits

Methods

bool
usesRateLimits()

Determine if this resource defines rate limits.

array
resolveRateLimitPolicies(PendingRequest $pendingRequest)

Resolve the admission policies for an operation.

UnitEnum|string|null
resolveRateLimitStoreName()

Resolve the selected rate limiter store.

bool
shouldWaitForRateLimits()

Determine if denied rate limits should be awaited.

string
resolveRateLimitCooldownKeyFor(PendingRequest $pendingRequest)

Resolve the stable cooldown key for an operation.

int|null
resolveRateLimitCooldownFor(Response $response)

Resolve the cooldown imposed by a response.

array
resolveRateLimits(PendingRequest $pendingRequest)

Resolve the admission policies for an operation.

UnitEnum|string|null
resolveRateLimitStore()

Resolve the selected rate limiter store.

bool
waitForRateLimits()

Determine if denied rate limits should be awaited.

string
resolveRateLimitCooldownKey(PendingRequest $pendingRequest)

Resolve the stable cooldown key for an operation.

int|null
resolveRateLimitCooldown(Response $response)

Resolve the cooldown imposed by a response.

Details

at line 21
final bool usesRateLimits()

internal  
 

Determine if this resource defines rate limits.

Return Value

bool

at line 32
final array resolveRateLimitPolicies(PendingRequest $pendingRequest)

internal  
 

Resolve the admission policies for an operation.

Parameters

PendingRequest $pendingRequest

Return Value

array

at line 42
final UnitEnum|string|null resolveRateLimitStoreName()

internal  
 

Resolve the selected rate limiter store.

Return Value

UnitEnum|string|null

at line 52
final bool shouldWaitForRateLimits()

internal  
 

Determine if denied rate limits should be awaited.

Return Value

bool

at line 62
final string resolveRateLimitCooldownKeyFor(PendingRequest $pendingRequest)

internal  
 

Resolve the stable cooldown key for an operation.

Parameters

PendingRequest $pendingRequest

Return Value

string

at line 72
final int|null resolveRateLimitCooldownFor(Response $response)

internal  
 

Resolve the cooldown imposed by a response.

Parameters

Response $response

Return Value

int|null

at line 82
abstract protected array resolveRateLimits(PendingRequest $pendingRequest)

Resolve the admission policies for an operation.

Parameters

PendingRequest $pendingRequest

Return Value

array

at line 87
protected UnitEnum|string|null resolveRateLimitStore()

Resolve the selected rate limiter store.

Return Value

UnitEnum|string|null

at line 95
protected bool waitForRateLimits()

Determine if denied rate limits should be awaited.

Return Value

bool

at line 103
protected string resolveRateLimitCooldownKey(PendingRequest $pendingRequest)

Resolve the stable cooldown key for an operation.

Parameters

PendingRequest $pendingRequest

Return Value

string

at line 114
protected int|null resolveRateLimitCooldown(Response $response)

Resolve the cooldown imposed by a response.

Override this method to support a provider-specific response format or enforce a maximum duration defined by the provider.

Parameters

Response $response

Return Value

int|null