8000 Add an example of the specific method in the interface docblock · symfony/symfony@e6abce2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e6abce2

Browse files
committed
Add an example of the specific method in the interface docblock
1 parent 9e7a97c commit e6abce2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Symfony/Component/Messenger/Handler/MessageSubscriberInterface.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ interface MessageSubscriberInterface extends MessageHandlerInterface
3131
* [FirstMessage::class, 0],
3232
* [SecondMessage::class, -10],
3333
* ];
34+
*
35+
* It can also specify a method and/or a priority per message:
36+
*
37+
* return [
38+
* FirstMessage::class => 'firstMessageMethod',
39+
* SecondMessage::class => ['secondMessageMethod', 20],
40+
* ];
3441
*
3542
* The `__invoke` method of the handler will be called as usual with the message to handle.
3643
*

0 commit comments

Comments
 (0)
0