Skip to content

Commit b9e9de2

Browse files
authored
docs: add tagged inject (#1578)
1 parent 30f9cdf commit b9e9de2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/1-essentials/05-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ final readonly class BookController
335335

336336
While constructor injection is almost always the preferred way to go, Tempest also offers the ability to inject values straight into properties, without them being requested by the constructor.
337337

338-
You may mark any property—public, protected, or private—with the `#[Inject]` attribute. Whenever a class instance is resolved via the container, its properties marked for injection will be provided the right value.
338+
You may mark any property—public, protected, or private—with the `#[Inject]` attribute. Whenever a class instance is resolved via the container, its properties marked for injection will be provided the right value. Tagged singletons may also be injected using the optional `tag` parameter of the `#[Inject]` attribute.
339339

340340
```php Tempest/Console/src/HasConsole.php
341341
use Tempest\Container\Inject;

0 commit comments

Comments
 (0)