Skip to content

Commit acf78df

Browse files
authored
Add a hint to reduce confusion about interface call vs. getAdapter.
1 parent 59b09d2 commit acf78df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/backend/behaviors.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ If we were to represent the behavior of choosing the correct outlet adapter in P
332332

333333
This process of choosing the right adapter based on the information of the context and the requested interface implements the design pattern of an abstract factory.
334334

335+
```{hint} The notation `ISchuko(context)` is a shortcut for `getAdapter(context, ISchuko)`.
336+
It executes exactly the same logic behid the scenes with the same result.
337+
```
338+
335339
Similarly, using the {ref}`behavior code example <behavior-code-example>` above:
336340
337341
- You would call an abstract factory with `getAdapter(context, IPriceBehavior)` to get an adapter, `price_for_context`.

0 commit comments

Comments
 (0)