@@ -9,24 +9,24 @@ DebugFormatter Helper
9
9
10
10
The :class: `Symfony\\ Component\\ Console\\ Helper\\ DebugFormatterHelper ` provides
11
11
functions to output debug information when running an external program, for
12
- instance a process or HTTP request. It is included in the default helper set,
13
- which you can get by calling
14
- :method: `Symfony\\ Component\\ Console\\ Command\\ Command::getHelperSet `::
12
+ instance a process or HTTP request. It is included in the default helper set
13
+ and you can get it by calling
14
+ :method: `Symfony\\ Component\\ Console\\ Command\\ Command::getHelper `::
15
15
16
16
$debugFormatter = $this->getHelper('debug_formatter');
17
17
18
18
The formatter only formats strings, which you can use to output to the console,
19
- but also to log the information or anything else.
19
+ but also to log the information or do anything else.
20
20
21
- All methods of this helper have an identifier as the first argument. This is an
21
+ All methods of this helper have an identifier as the first argument. This is a
22
22
unique value for each program. This way, the helper can debug information for
23
23
multiple programs at the same time. When using the
24
24
:doc: `Process component </components/process >`, you probably want to use
25
25
:phpfunction: `spl_object_hash `.
26
26
27
27
.. tip ::
28
28
29
- This information is often too verbose to show by default. You can use
29
+ This information is often too verbose to be shown by default. You can use
30
30
:ref: `verbosity levels <verbosity-levels >` to only show it when in
31
31
debugging mode (``-vvv ``).
32
32
@@ -80,15 +80,15 @@ And this in case of failure:
80
80
The third argument is a boolean which tells the function if the output is error
81
81
output or not. When ``true ``, the output is considered error output.
82
82
83
- The fourth and fifth argument allow you to override the prefix for respectively
84
- the normal output and error output.
83
+ The fourth and fifth argument allow you to override the prefix for the normal
84
+ output and error output respectively .
85
85
86
86
Stopping a Program
87
87
------------------
88
88
89
89
When a program is stopped, you can use
90
- :method: `Symfony\\ Component\\ Console\\ Helper\\ DebugFormatterHelper::progress `
91
- to notify this to the users::
90
+ :method: `Symfony\\ Component\\ Console\\ Helper\\ DebugFormatterHelper::run ` to
91
+ notify this to the users::
92
92
93
93
// ...
94
94
$output->writeln($debugFormatter->progress(spl_object_hash($process), 'Some command description', $process->isSuccesfull()));
0 commit comments