Skip to content

Commit 5e502ea

Browse files
committed
[symfony#2352] Minor tweaks to new console events section
1 parent c7c215f commit 5e502ea

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

components/console/events.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.. index::
22
single: Console; Events
33

4-
.. versionadded:: 2.3
5-
The feature described in this chapter was added in 2.3.
6-
74
Using Events
85
============
96

7+
.. versionadded:: 2.3
8+
Console events were added in Symfony 2.3.
9+
1010
The Application class of the Console component allows you to optionally hook
1111
into the lifecycle of a console application via events. Instead of reinventing
1212
the wheel, it uses the Symfony EventDispatcher component to do the work::
@@ -18,7 +18,7 @@ the wheel, it uses the Symfony EventDispatcher component to do the work::
1818
$application->setDispatcher($dispatcher);
1919
$application->run();
2020

21-
The ``ConsoleEvents::COMMAND`` event
21+
The ``ConsoleEvents::COMMAND`` Event
2222
------------------------------------
2323

2424
**Typical Purposes**: Doing something before any command is run (like logging
@@ -57,8 +57,8 @@ been executed.
5757

5858
After the command has been executed, the ``ConsoleEvents::TERMINATE`` event is
5959
dispatched. It can be used to do any actions that need to be executed for all
60-
commands or to cleanup what you initiated in the ``ConsoleEvents::COMMAND``
61-
command (like sending logs, closing a database connection, sending emails,
60+
commands or to cleanup what you initiated in a ``ConsoleEvents::COMMAND``
61+
listener (like sending logs, closing a database connection, sending emails,
6262
...). A listener might also change the exit code.
6363

6464
Listeners receive a
@@ -94,7 +94,7 @@ The ``ConsoleEvents::EXCEPTION`` event
9494
command.
9595

9696
Whenever an exception is thrown by a command, the ``ConsoleEvents::EXCEPTION``
97-
command is dispatched. A listener can wrap or change the exception or do
97+
event is dispatched. A listener can wrap or change the exception or do
9898
anything useful before the exception is thrown by the application.
9999

100100
Listeners receive a

components/console/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Console
77
introduction
88
usage
99
single_command_tool
10-
helpers/index
1110
events
11+
helpers/index

components/map.rst.inc

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* :doc:`/components/console/introduction`
1717
* :doc:`/components/console/usage`
1818
* :doc:`/components/console/single_command_tool`
19+
* :doc:`/components/console/events`
1920
* :doc:`/components/console/helpers/index`
2021

2122
* **CSS Selector**

0 commit comments

Comments
 (0)