RateLimiter
- Full name:
\Codefy\Framework\Http\Throttle\RateLimiter
Properties
conditions
cache
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$cache | \Psr\Cache\CacheItemPoolInterface |
add
public add(\Codefy\Framework\Http\Throttle\Condition $condition): \Codefy\Framework\Http\Throttle\RateLimiter
Parameters:
Parameter | Type | Description |
---|---|---|
$condition | \Codefy\Framework\Http\Throttle\Condition |
increment
Parameters:
Parameter | Type | Description |
---|---|---|
$identifier | string | |
$count | int |
Throws:
getIntervals
Parameters:
Parameter | Type | Description |
---|---|---|
$identifier | string |
Throws:
reset
Reset counter
Parameters:
Parameter | Type | Description |
---|---|---|
$identifier | string |
Throws:
getItem
private getItem(string $identifier, \Codefy\Framework\Http\Throttle\Condition $condition): \Psr\Cache\CacheItemInterface
Parameters:
Parameter | Type | Description |
---|---|---|
$identifier | string | |
$condition | \Codefy\Framework\Http\Throttle\Condition |
Throws:
Automatically generated on 2025-10-13