1 | <?php |
||
20 | class Registry implements RegistryInterface |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @var ContainerInterface |
||
25 | */ |
||
26 | private $container; |
||
27 | |||
28 | /** |
||
29 | * @var AbstractObjectType[] |
||
30 | */ |
||
31 | private $values = []; |
||
32 | /** |
||
33 | * @var null|AuthorizationServiceInterface |
||
34 | */ |
||
35 | private $authorizationService; |
||
36 | /** |
||
37 | * @var AuthenticationServiceInterface |
||
38 | */ |
||
39 | private $authenticationService; |
||
40 | /** |
||
41 | * @var Reader |
||
42 | */ |
||
43 | private $annotationReader; |
||
44 | /** |
||
45 | * @var TypeMapperInterface |
||
46 | */ |
||
47 | private $typeMapper; |
||
48 | /** |
||
49 | * @var HydratorInterface |
||
50 | */ |
||
51 | private $hydrator; |
||
52 | |||
53 | /** |
||
54 | * @param ContainerInterface $container The proxied container. |
||
55 | */ |
||
56 | public function __construct(ContainerInterface $container, AuthorizationServiceInterface $authorizationService, AuthenticationServiceInterface $authenticationService, Reader $annotationReader, TypeMapperInterface $typeMapper, HydratorInterface $hydrator) |
||
65 | |||
66 | /** |
||
67 | * Finds an entry of the container by its identifier and returns it. |
||
68 | * |
||
69 | * @param string $id Identifier of the entry to look for. |
||
70 | * |
||
71 | * @throws NotFoundExceptionInterface No entry was found for **this** identifier. |
||
72 | * @throws ContainerExceptionInterface Error while retrieving the entry. |
||
73 | * |
||
74 | * @return mixed Entry. |
||
75 | */ |
||
76 | public function get($id) |
||
92 | |||
93 | /** |
||
94 | * Returns true if the container can return an entry for the given identifier. |
||
95 | * Returns false otherwise. |
||
96 | * |
||
97 | * `has($id)` returning true does not mean that `get($id)` will not throw an exception. |
||
98 | * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. |
||
99 | * |
||
100 | * @param string $id Identifier of the entry to look for. |
||
101 | * |
||
102 | * @return bool |
||
103 | */ |
||
104 | public function has($id) |
||
119 | |||
120 | /** |
||
121 | * Returns the authorization service. |
||
122 | * |
||
123 | * @return AuthorizationServiceInterface |
||
124 | */ |
||
125 | public function getAuthorizationService(): AuthorizationServiceInterface |
||
129 | |||
130 | /** |
||
131 | * @return AuthenticationServiceInterface |
||
132 | */ |
||
133 | public function getAuthenticationService(): AuthenticationServiceInterface |
||
137 | |||
138 | /** |
||
139 | * @return Reader |
||
140 | */ |
||
141 | public function getAnnotationReader(): Reader |
||
145 | |||
146 | /** |
||
147 | * @return TypeMapperInterface |
||
148 | */ |
||
149 | public function getTypeMapper(): TypeMapperInterface |
||
153 | |||
154 | /** |
||
155 | * @return HydratorInterface |
||
156 | */ |
||
157 | public function getHydrator(): HydratorInterface |
||
161 | } |
||
162 |