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

Commitc6f6e71

Browse files
authored
Apply suggestions from code review
1 parent43db59a commitc6f6e71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎service_container/service_subscribers_locators.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,17 @@ attribute::
359359
{
360360
public function __construct(
361361
#[AutowireLocator([
362-
'fooHandlerAlias' => FooHandler::class,
363-
'barHandlerAlias' => new SubscribedService(type: BarHandler::class, attributes: new Autowire('%some.parameter%'),
364-
'optionalBazHandlerAlias' => '?'.BazHandler::class,
362+
'foo' => FooHandler::class,
363+
'bar' => new SubscribedService(type: BarHandler::class, attributes: new Autowire('%some.parameter%'),
364+
'optionalBaz' => '?'.BazHandler::class,
365365
)]
366366
private ContainerInterface $handlers,
367367
) {
368368
}
369369

370370
public function handle(Command $command): mixed
371371
{
372-
$fooHandler = $this->handlers->get('fooHandlerAlias');
372+
$fooHandler = $this->handlers->get('foo');
373373

374374
// ...
375375
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp