@@ 41-48 (lines=8) @@ | ||
38 | /** |
|
39 | * {@inheritdoc} |
|
40 | */ |
|
41 | public function get(string $id): ModuleInterface |
|
42 | { |
|
43 | if (!isset($this->modules[$id])) { |
|
44 | throw new OutOfBoundsException("Can not load module '$id' from cache"); |
|
45 | } |
|
46 | ||
47 | return $this->modules[$id]; |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * {@inheritdoc} |
|
@@ 65-72 (lines=8) @@ | ||
62 | /** |
|
63 | * {@inheritdoc} |
|
64 | */ |
|
65 | public function remove(string $id) |
|
66 | { |
|
67 | if (!isset($this->modules[$id])) { |
|
68 | throw new OutOfBoundsException("Module '$id' does not exists in cache"); |
|
69 | } |
|
70 | ||
71 | unset($this->modules[$id]); |
|
72 | } |
|
73 | ||
74 | ||
75 | } |