annotation Athena::DependencyInjection::AutoconfigureTag
#
Similar to ADI::Autoconfigure
but specialized for easily configuring tags.
Accepts an optional tag name as the first positional parameter, otherwise defaults to the FQN of the type.
Named arguments may also be provided that'll be added to the tag as attributes.
Tip
This type is best used in conjunction with ADI::TaggedIterator
.
Example#
# All services including `SomeInterface` will be tagged with `"some-tag"`.
@[ADI::AutoconfigureTag("some-tag")]
module SomeInterface; end
# All services including `OtherInterface` will be tagged with `"OtherInterface"`.
@[ADI::AutoconfigureTag]
module OtherInterface; end