File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
cookbook/event_dispatcher Expand file tree Collapse file tree 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
255255decision to use either of them is usually a matter of personal taste. However,
256256there are some minor advantages for each of them:
257257
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+
258264Debugging Event Listeners
259265-------------------------
260266
@@ -274,9 +280,3 @@ its name:
274280.. code-block :: bash
275281
276282 $ 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>`.
1111| Applies to | :ref: `property or method <validation-property-target >` |
1212+----------------+-----------------------------------------------------------------------+
1313| Options | - `message `_ |
14- | | - `payload `_ |
14+ | | - `payload `_ |
1515+----------------+-----------------------------------------------------------------------+
1616| Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ IsFalse ` |
1717+----------------+-----------------------------------------------------------------------+
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Also see :doc:`NotNull <NotNull>`.
1111| Applies to | :ref: `property or method <validation-property-target >` |
1212+----------------+-----------------------------------------------------------------------+
1313| Options | - `message `_ |
14- | | - `payload `_ |
14+ | | - `payload `_ |
1515+----------------+-----------------------------------------------------------------------+
1616| Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ IsNull ` |
1717+----------------+-----------------------------------------------------------------------+
You can’t perform that action at this time.
0 commit comments