Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class FilteredContainer implements ContainerInterface |
||
16 | { |
||
17 | /** @var FilteredContainerInterface */ |
||
18 | private $container; |
||
19 | /** @var ItemInterface[] */ |
||
20 | private $items; |
||
21 | |||
22 | public function __construct(FilteredContainerInterface $container) |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return ItemInterface[] |
||
29 | */ |
||
30 | public function getItems(): array |
||
31 | { |
||
32 | if (empty($this->items)) { |
||
33 | $filter = new ChainFilter($this->container->getFilters()); |
||
34 | $this->items = $filter->filterItems($this->container)->getItems(); |
||
35 | } |
||
36 | |||
37 | return $this->items; |
||
38 | } |
||
39 | |||
40 | public function get(string $identifier): ItemInterface |
||
43 | } |
||
44 | } |
||
45 |