Skip to content

Navigation Menu

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

Appearance settings

Commit e6abce2

Browse filesBrowse files
committed
Add an example of the specific method in the interface docblock
1 parent 9e7a97c commit e6abce2
Copy full SHA for e6abce2

File tree

1 file changed

+7
-0
lines changed
Filter options

1 file changed

+7
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Handler/MessageSubscriberInterface.php
+7Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.