Permalink
Browse files

[#2352] Minor tweaks to new console events section

  • Loading branch information...
1 parent c7c215f commit 5e502ea68d0cc4af16e526f50878f839881ad0af @weaverryan weaverryan committed Mar 30, 2013
Showing with 9 additions and 8 deletions.
  1. +7 −7 components/console/events.rst
  2. +1 −1 components/console/index.rst
  3. +1 −0 components/map.rst.inc
@@ -1,12 +1,12 @@
.. index::
single: Console; Events
-.. versionadded:: 2.3
- The feature described in this chapter was added in 2.3.
-
Using Events
============
+.. versionadded:: 2.3
+ Console events were added in Symfony 2.3.
+
The Application class of the Console component allows you to optionally hook
into the lifecycle of a console application via events. Instead of reinventing
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::
$application->setDispatcher($dispatcher);
$application->run();
-The ``ConsoleEvents::COMMAND`` event
+The ``ConsoleEvents::COMMAND`` Event
------------------------------------
**Typical Purposes**: Doing something before any command is run (like logging
@@ -57,8 +57,8 @@ been executed.
After the command has been executed, the ``ConsoleEvents::TERMINATE`` event is
dispatched. It can be used to do any actions that need to be executed for all
-commands or to cleanup what you initiated in the ``ConsoleEvents::COMMAND``
-command (like sending logs, closing a database connection, sending emails,
+commands or to cleanup what you initiated in a ``ConsoleEvents::COMMAND``
+listener (like sending logs, closing a database connection, sending emails,
...). A listener might also change the exit code.
Listeners receive a
@@ -94,7 +94,7 @@ The ``ConsoleEvents::EXCEPTION`` event
command.
Whenever an exception is thrown by a command, the ``ConsoleEvents::EXCEPTION``
-command is dispatched. A listener can wrap or change the exception or do
+event is dispatched. A listener can wrap or change the exception or do
anything useful before the exception is thrown by the application.
Listeners receive a
@@ -7,5 +7,5 @@ Console
introduction
usage
single_command_tool
- helpers/index
events
+ helpers/index
View
@@ -16,6 +16,7 @@
* :doc:`/components/console/introduction`
* :doc:`/components/console/usage`
* :doc:`/components/console/single_command_tool`
+ * :doc:`/components/console/events`
* :doc:`/components/console/helpers/index`
* **CSS Selector**

0 comments on commit 5e502ea

Please sign in to comment.