1 | <?php |
||
16 | class Registry implements ContainerInterface |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * @var ContainerInterface |
||
21 | */ |
||
22 | private $container; |
||
23 | |||
24 | /** |
||
25 | * @var AbstractObjectType[] |
||
26 | */ |
||
27 | private $values = []; |
||
28 | |||
29 | /** |
||
30 | * @param ContainerInterface $container The proxied container. |
||
31 | */ |
||
32 | public function __construct(ContainerInterface $container) |
||
36 | |||
37 | /** |
||
38 | * Finds an entry of the container by its identifier and returns it. |
||
39 | * |
||
40 | * @param string $id Identifier of the entry to look for. |
||
41 | * |
||
42 | * @throws NotFoundExceptionInterface No entry was found for **this** identifier. |
||
43 | * @throws ContainerExceptionInterface Error while retrieving the entry. |
||
44 | * |
||
45 | * @return mixed Entry. |
||
46 | */ |
||
47 | public function get($id) |
||
63 | |||
64 | /** |
||
65 | * Returns true if the container can return an entry for the given identifier. |
||
66 | * Returns false otherwise. |
||
67 | * |
||
68 | * `has($id)` returning true does not mean that `get($id)` will not throw an exception. |
||
69 | * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. |
||
70 | * |
||
71 | * @param string $id Identifier of the entry to look for. |
||
72 | * |
||
73 | * @return bool |
||
74 | */ |
||
75 | public function has($id) |
||
90 | } |
||
91 |