Skip to content

Commit 5e1b93f

Browse files
committed
Very minor changes
1 parent 8ac4a6d commit 5e1b93f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/Delegate-lookup-meta.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ class CompositeContainer {
178178

179179
Cons have been extensively discussed [here](https://github.com/container-interop/container-interop/pull/8#issuecomment-51721777).
180180
Basically, forcing a setter into an interface is a bad idea. Setters are similar to constructor arguments,
181-
and it's a bad idea to standardize a constructor.
182-
This outweights the benefits of the interface.
181+
and it's a bad idea to standardize a constructor: how the delegate container is configured into a container is an implementation detail. This outweights the benefits of the interface.
183182

184183
### 4.4 Alternative: no exception case for delegate lookups
185184

docs/Delegate-lookup.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Users of dependency injections containers (DIC) are refered to as `user`.
2424

2525
In a dependency injection container, the container is used to fetch entries.
2626
Entries can have dependencies on other entries. Usually, these other entries are fetched by the container.
27+
2728
The *delegate lookup* feature is the ability for a container to fetch dependencies in
2829
another container. In the rest of the document, the word "container" will reference the container
2930
implemented by the implementor. The word "delegate container" will reference the container we are
@@ -40,20 +41,20 @@ A container implementing the *delegate lookup* feature:
4041

4142
When a container is configured to use a delegate container for dependencies:
4243

43-
- Calls to the `get` method should only return an entry if the entry is part of the container.
44+
- Calls to the `get` method should only return an entry if the entry is part of the container.
4445
If the entry is not part of the container, an exception should be thrown
4546
(as requested by the [`ContainerInterface`](ContainerInterface.md)).
4647
- Calls to the `has` method should only return `true` if the entry is part of the container.
4748
If the entry is not part of the container, `false` should be returned.
4849
- If the fetched entry has dependencies, **instead** of performing
4950
the dependency lookup in the container, the lookup is performed on the *delegate container*.
5051

51-
Important! By default, the lookup SHOULD be performed on the delegate container **only**, not on the container itself.
52+
Important: By default, the dependency lookups SHOULD be performed on the delegate container **only**, not on the container itself.
5253

5354
It is however allowed for containers to provide exception cases for special entries, and a way to lookup
5455
into the same container (or another container) instead of the delegate container.
5556

56-
2. Package / Interface
57+
3. Package / Interface
5758
----------------------
5859

59-
This feature is not tied to any interface or package.
60+
This feature is not tied to any code, interface or package.

0 commit comments

Comments
 (0)