1 | <?php |
||
10 | class Container implements ContainerInterface |
||
11 | { |
||
12 | private $config = []; |
||
13 | |||
14 | public function __construct($config) |
||
18 | |||
19 | /** |
||
20 | * Finds an entry of the container by its identifier and returns it. |
||
21 | * |
||
22 | * @param string $id Identifier of the entry to look for. |
||
23 | * @return mixed Entry. |
||
24 | * @throws KeyNotFoundException |
||
25 | * @throws ReflectionException |
||
26 | */ |
||
27 | public function get($id) |
||
52 | |||
53 | /** |
||
54 | * Returns true if the container can return an entry for the given identifier. |
||
55 | * Returns false otherwise. |
||
56 | * `has($id)` returning true does not mean that `get($id)` will not throw an exception. |
||
57 | * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. |
||
58 | * |
||
59 | * @param string $id Identifier of the entry to look for. |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function has($id) |
||
66 | |||
67 | /** |
||
68 | * @param $id |
||
69 | * @return mixed |
||
70 | * @throws KeyNotFoundException |
||
71 | */ |
||
72 | public function raw($id) |
||
80 | } |
||
81 |