Documentation

RateLimitStoreInterface

Table of Contents

Methods

allForClient()  : array<string|int, mixed>
Returns all data for one client (for debugging).
get()  : array<string|int, mixed>|null
Returns stored data for the given client identifier and window (second/day).
set()  : void
Stores data for the client and window (second/day).

Methods

allForClient()

Returns all data for one client (for debugging).

public allForClient(string $clientId) : array<string|int, mixed>
Parameters
$clientId : string
Return values
array<string|int, mixed>

get()

Returns stored data for the given client identifier and window (second/day).

public get(string $clientId, string $window) : array<string|int, mixed>|null

Array: remaining => int timestamp => int (unix time when the value was received).

Parameters
$clientId : string
$window : string
Return values
array<string|int, mixed>|null

set()

Stores data for the client and window (second/day).

public set(string $clientId, string $window, int $remaining, int $timestamp) : void
Parameters
$clientId : string
$window : string
$remaining : int
$timestamp : int
On this page

Search results