File tree 3 files changed +8
-8
lines changed
cookbook/event_dispatcher
3 files changed +8
-8
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;
281
- * **Listeners are more flexible ** because bundles can enable or disable each of
282
- them conditionally depending on some configuration value.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Also see :doc:`IsTrue <IsTrue>`.
11
11
| Applies to | :ref: `property or method <validation-property-target >` |
12
12
+----------------+-----------------------------------------------------------------------+
13
13
| Options | - `message `_ |
14
- | | - `payload `_ |
14
+ | | - `payload `_ |
15
15
+----------------+-----------------------------------------------------------------------+
16
16
| Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ IsFalse ` |
17
17
+----------------+-----------------------------------------------------------------------+
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Also see :doc:`NotNull <NotNull>`.
11
11
| Applies to | :ref: `property or method <validation-property-target >` |
12
12
+----------------+-----------------------------------------------------------------------+
13
13
| Options | - `message `_ |
14
- | | - `payload `_ |
14
+ | | - `payload `_ |
15
15
+----------------+-----------------------------------------------------------------------+
16
16
| Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ IsNull ` |
17
17
+----------------+-----------------------------------------------------------------------+
You can’t perform that action at this time.
0 commit comments