| 1 | <?php |
||
| 13 | class PSR6Adapter implements ThrottleStorageInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var CacheItemPoolInterface |
||
| 17 | */ |
||
| 18 | private $cacheItemPool; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * PSR6Adapter constructor. |
||
| 22 | */ |
||
| 23 | public function __construct(CacheItemPoolInterface $cacheItemPool) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @inheritDoc |
||
| 30 | */ |
||
| 31 | public function hasCounter(string $storageKey): bool |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @inheritDoc |
||
| 38 | */ |
||
| 39 | public function getCounter(string $storageKey) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @inheritDoc |
||
| 52 | */ |
||
| 53 | public function saveCounter(string $storageKey, Counter $counter, float $ttl = null) |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @inheritDoc |
||
| 65 | */ |
||
| 66 | public function deleteCounter(string $storageKey) |
||
| 70 | } |
||
| 71 |