Backend
Less than 1 minute
Backend
- Full name:
\Hazaar\RateLimiter\Interfaces\Backend
Methods
check
Retrieves the rate limit information for the specified identifier and adds the current timestamp to the log.
public check(string $identifier): array{log: int[], last: int, result?: bool, last_result?: bool}
Parameters:
Parameter | Type | Description |
---|---|---|
$identifier | string | the identifier for which to retrieve the rate limit information |
Return Value:
the rate limit information for the specified identifier
get
Retrieves the rate limit information for the specified identifier without adding the current timestamp to the log.
public get(string $identifier): array{log: int[], last: int, result?: bool, last_result?: bool}
Parameters:
Parameter | Type | Description |
---|---|---|
$identifier | string | the identifier for which to retrieve the rate limit information |
Return Value:
the rate limit information for the specified identifier
remove
Removes the rate limit information for the specified identifier.
public remove(string $identifier): void
Parameters:
Parameter | Type | Description |
---|---|---|
$identifier | string | the identifier for which to remove the rate limit information |
shutdown
Shutdown the rate limiter backend a commit any changes.
public shutdown(): void
Automatically generated on 2024-11-14