File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ Users of dependency injections containers (DIC) are referred to as `user`.
34
34
35
35
- ` has ` takes one unique parameter: an entry identifier. It MUST return ` true `
36
36
if an entry identifier is known to the container and ` false ` if it is not.
37
+ ` has($id) ` returning true does not mean that ` get($id) ` will not throw an exception.
38
+ It does however mean that ` get($id) ` will not throw a ` NotFoundException ` .
37
39
38
40
### 1.2 Exceptions
39
41
@@ -114,6 +116,9 @@ interface ContainerInterface
114
116
* Returns true if the container can return an entry for the given identifier.
115
117
* Returns false otherwise.
116
118
*
119
+ * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
120
+ * It does however mean that `get($id)` will not throw a `NotFoundException`.
121
+ *
117
122
* @param string $id Identifier of the entry to look for.
118
123
*
119
124
* @return boolean
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ public function get($id);
28
28
/**
29
29
* Returns true if the container can return an entry for the given identifier.
30
30
* Returns false otherwise.
31
+ *
32
+ * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
33
+ * It does however mean that `get($id)` will not throw a `NotFoundException`.
31
34
*
32
35
* @param string $id Identifier of the entry to look for.
33
36
*
You can’t perform that action at this time.
0 commit comments