File tree 1 file changed +6
-6
lines changed
cookbook/event_dispatcher
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,12 @@ Listeners and subscribers can be used in the same application indistinctly. The
255
255
decision to use either of them is usually a matter of personal taste. However,
256
256
there are some minor advantages for each of them:
257
257
258
+ * **Subscribers are easier to reuse ** because the knowledge of the events is kept
259
+ in the class rather than in the service definition. This is the reason why
260
+ Symfony uses subscribers internally;
261
+ * **Listeners are more flexible ** because bundles can enable or disable each of
262
+ them conditionally depending on some configuration value.
263
+
258
264
Debugging Event Listeners
259
265
-------------------------
260
266
@@ -274,9 +280,3 @@ its name:
274
280
.. code-block :: bash
275
281
276
282
$ php app/console debug:event-dispatcher kernel.exception
277
- =======
278
- * **Subscribers are easier to reuse ** because the knowledge of the events is kept
279
- in the class rather than in the service definition. This is the reason why
280
- Symfony uses subscribers internally;
4217
281
- * **Listeners are more flexible ** because bundles can enable or disable each of
282
- them conditionally depending on some configuration value.
You can’t perform that action at this time.
0 commit comments