1 | <?php |
||
9 | final class PredisRateLimiter extends AbstractTTLRateLimiter |
||
10 | { |
||
11 | /** @var ClientInterface */ |
||
12 | private $predis; |
||
13 | |||
14 | 5 | public function __construct(ClientInterface $predis, string $keyPrefix = '') |
|
20 | |||
21 | 5 | protected function getCurrent(string $key): int |
|
25 | |||
26 | 5 | protected function updateCounter(string $key, int $interval): int |
|
36 | |||
37 | 3 | protected function ttl(string $key): int |
|
41 | } |
||
42 |