Skip to content
Merged
Changes from all 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 deletions service_container.rst
Original file line number Diff line number Diff 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 Down Expand 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 Down Expand 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