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

Commit0b60280

Browse files
committed
[#17383] Small tweaks to code examples
1 parentdf678e5 commit0b60280

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎messenger/multiple_buses.rst‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ an **event bus**. The event bus could have zero or more subscribers.
3434
middleware:
3535
-validation
3636
event.bus:
37-
# the 'allow_no_handlers' middleware allows to have no handler
38-
# configured for this bus without throwing an exception
39-
# the 'allow_no_senders' middleware allows to have no sender
40-
# configured for this bus without throwing an exception
4137
default_middleware:
4238
enabled:true
39+
# set "allow_no_handlers" to true (default is false) to allow having
40+
# no handler configured for this bus without throwing an exception
4341
allow_no_handlers:false
42+
# set "allow_no_senders" to false (default is true) to throw an exception
43+
# if no sender is configured for this bus
4444
allow_no_senders:true
4545
middleware:
4646
-validation
@@ -67,12 +67,12 @@ an **event bus**. The event bus could have zero or more subscribers.
6767
<framework:busname="query.bus">
6868
<framework:middlewareid="validation"/>
6969
</framework:bus>
70-
<!-- the 'allow_no_handlers' middleware allows to have no handler
71-
configured for this bus without throwing an exception-->
72-
<!-- the 'allow_no_senders' middleware allows to have no sender
73-
configured for this bus without throwing an exception-->
7470
<framework:busname="event.bus">
75-
<framework:default-middlewareenabled="true"allow_no_handlers="false"allow_no_senders="true"/>
71+
<!-- set "allow-no-handlers" to true (default is false) to allow having
72+
no handler configured for this bus without throwing an exception-->
73+
<!-- set "allow-no-senders" to false (default is true) to throw an exception
74+
if no sender is configured for this bus-->
75+
<framework:default-middlewareenabled="true"allow-no-handlers="false"allow-no-senders="true"/>
7676
<framework:middlewareid="validation"/>
7777
</framework:bus>
7878
</framework:messenger>
@@ -96,13 +96,13 @@ an **event bus**. The event bus could have zero or more subscribers.
9696
$queryBus->middleware()->id('validation');
9797
9898
$eventBus = $framework->messenger()->bus('event.bus');
99-
// the 'allowNoHandlers' middleware allows to have no handler
100-
// configured for this bus without throwing an exception
101-
// the 'allowNoSenders' middleware allows to have no sender
102-
// configured for this bus without throwing an exception
10399
$eventBus->defaultMiddleware()
104100
->enabled(true)
101+
// set "allowNoHandlers" to true (default is false) to allow having
102+
// no handler configured for this bus without throwing an exception
105103
->allowNoHandlers(false)
104+
// set "allowNoSenders" to false (default is true) to throw an exception
105+
// if no sender is configured for this bus
106106
->allowNoSenders(true)
107107
;
108108
$eventBus->middleware()->id('validation');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp