-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameters name binding #352
base: master
Are you sure you want to change the base?
Conversation
xepozz
commented
Feb 13, 2024
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ❌ |
Fixed issues | comma-separated list of tickets # fixed by the PR, if any |
Related PR | yiisoft/definitions#87 |
PR Summary
|
Need docs. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #352 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 161 161
===========================================
Files 11 11
Lines 466 466
===========================================
Hits 466 466 ☔ View full report in Codecov by Sentry. |
@@ -341,6 +341,41 @@ $config = ContainerConfig::create() | |||
$container = new Container($config); | |||
``` | |||
|
|||
## Name binding | |||
|
|||
Name binding is a way to bind a name to a definition. It is used to resolve a definition not by its class name but by a name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter name? Just a "name" is vague in this context.
|
||
Name binding is a way to bind a name to a definition. It is used to resolve a definition not by its class name but by a name. | ||
|
||
Set a definitions with a specific name. It may be typed or untyped reference like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set a definitions with a specific name. It may be typed or untyped reference like: | |
Set definitions with a specific name. It may be typed or untyped reference like: |
] | ||
``` | ||
|
||
So now you can resolve a definition by its name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now you can resolve a definition by its name: | |
So now you can resolve a definition by parameter name: |