Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DependencyInjection] Bind tagged services#12741

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
OskarStark merged 1 commit intosymfony:4.4fromtienvx:bind-tagged-services
Dec 2, 2019
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletionsservice_container.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -665,6 +665,7 @@ You can also use the ``bind`` keyword to bind specific arguments by name or type
# optionally you can define both the name and type of the argument to match
string $adminEmail: 'manager@example.com'
Psr\Log\LoggerInterface $requestLogger: '@monolog.logger.request'
iterable $rules: !tagged_iterator app.foo.rule

# ...

Expand DownExpand Up@@ -695,6 +696,10 @@ You can also use the ``bind`` keyword to bind specific arguments by name or type
type="service"
id="monolog.logger.request"
/>
<bind key="iterable $rules"
type="tagged_iterator"
tag="app.foo.rule"
/>
</defaults>

<!-- ... -->
Expand DownExpand Up@@ -728,6 +733,7 @@ You can also use the ``bind`` keyword to bind specific arguments by name or type
// optionally you can define both the name and type of the argument to match
->bind('string $adminEmail', 'manager@example.com')
->bind(LoggerInterface::class.' $requestLogger', ref('monolog.logger.request'))
->bind('iterable $rules', tagged_iterator('app.foo.rule'))
;

// ...
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp