Total Complexity | 9 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class ChainStorage implements Reader |
||
10 | { |
||
11 | /** |
||
12 | * @var Reader[] |
||
13 | */ |
||
14 | private $items = []; |
||
15 | |||
16 | public function __construct(array $items = []) |
||
17 | { |
||
18 | foreach ($items as $item) { |
||
19 | $this->addStorage($item); |
||
20 | } |
||
21 | } |
||
22 | |||
23 | public function addStorage(Reader $storage): void |
||
24 | { |
||
25 | $this->items[] = $storage; |
||
26 | } |
||
27 | |||
28 | public function has(string $key): bool |
||
37 | } |
||
38 | |||
39 | public function get(string $key): Key |
||
48 | } |
||
49 | } |
||
50 |