1 | <?php |
||
11 | final class Container extends Unbox implements ArrayAccess |
||
12 | { |
||
13 | /** |
||
14 | * @param Configuration $config |
||
15 | */ |
||
16 | public function __construct(Configuration $config) |
||
20 | |||
21 | /******************************************************************************** |
||
22 | * ArrayAccess interface |
||
23 | *******************************************************************************/ |
||
24 | |||
25 | /** |
||
26 | * @inheritDoc |
||
27 | */ |
||
28 | public function offsetExists($key) |
||
32 | |||
33 | /** |
||
34 | * @inheritDoc |
||
35 | */ |
||
36 | public function offsetGet($key) |
||
40 | |||
41 | /** |
||
42 | * @inheritDoc |
||
43 | */ |
||
44 | public function offsetSet($key, $value) |
||
45 | { |
||
46 | throw new BadMethodCallException(sprintf( |
||
47 | "%s does not support ArrayAccess::offsetSet, you must use %s to configure and create the container", |
||
48 | __CLASS__, |
||
49 | ContainerFactory::class |
||
50 | )); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @inheritDoc |
||
55 | */ |
||
56 | public function offsetUnset($key) |
||
57 | { |
||
58 | throw new BadMethodCallException(sprintf( |
||
59 | "%s does not support ArrayAccess::offsetUnset(), you must use %s to configure and create the container", |
||
60 | __CLASS__, |
||
61 | ContainerFactory::class |
||
62 | )); |
||
63 | } |
||
64 | |||
65 | /******************************************************************************** |
||
66 | * Slim Container "compatibility" |
||
67 | *******************************************************************************/ |
||
68 | |||
69 | /** |
||
70 | * @inheritDoc |
||
71 | */ |
||
72 | public function set($key, $value) |
||
80 | } |
||
81 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.