| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class ContextContainer implements ContainerInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var CompositeContextContainer |
||
| 16 | */ |
||
| 17 | private $container; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string The context that this container uses |
||
| 21 | */ |
||
| 22 | private $context; |
||
| 23 | public function __construct(CompositeContextContainer $parent, string $context) |
||
| 24 | { |
||
| 25 | $this->container = $parent; |
||
| 26 | $this->context = $context; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** @inheritdoc */ |
||
| 30 | public function get($id) |
||
| 31 | { |
||
| 32 | return $this->container->getFromContext($id, $this->context); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** @inheritdoc */ |
||
| 36 | public function has($id) |
||
| 39 | } |
||
| 40 | } |
||
| 41 |