Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Store; | |
| 6 | ||
| 7 | use Stewart\Contracts\Exception\StoreException; | |
| 8 | use Stewart\Contracts\Time\Duration; | |
| 9 | ||
| 10 | interface StoreBackend | |
| 11 | { | |
| 12 | /** @throws StoreException */ | |
| 13 | public function read(string $key): ?string; | |
| 14 | ||
| 15 | /** @throws StoreException */ | |
| 16 | public function write(string $key, string $value, ?Duration $ttl): void; | |
| 17 | ||
| 18 | /** @throws StoreException */ | |
| 19 | public function remove(string $key): void; | |
| 20 | ||
| 21 | /** @throws StoreException */ | |
| 22 | public function exists(string $key): bool; | |
| 23 | ||
| 24 | /** @throws StoreException */ | |
| 25 | public function increment(string $key, int $by): int; | |
| 26 | ||
| 27 | /** | |
| 28 | * @return list<string> | |
| 29 | * @throws StoreException | |
| 30 | */ | |
| 31 | public function keysWithPrefix(string $prefix): array; | |
| 32 | ||
| 33 | /** @throws StoreException */ | |
| 34 | public function removeByPrefix(string $prefix): void; | |
| 35 | ||
| 36 | /** @throws StoreException */ | |
| 37 | public function probe(): void; | |
| 38 | } |