Skip to content

Commit 9207f68

Browse files
author
Vincent Composieux
committed
[Console] Fix Console component getHelperSet()->get() to getHelper()
1 parent 2ae8281 commit 9207f68

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

components/console/helpers/dialoghelper.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ functions to ask the user for more information. It is included in the default
99
helper set, which you can get by calling
1010
:method:`Symfony\\Component\\Console\\Command\\Command::getHelperSet`::
1111

12-
$dialog = $this->getHelperSet()->get('dialog');
12+
$dialog = $this->getHelper('dialog');
1313

1414
All the methods inside the Dialog Helper have an
1515
:class:`Symfony\\Component\\Console\\Output\\OutputInterface` as the first
@@ -65,7 +65,7 @@ Autocompletion
6565
You can also specify an array of potential answers for a given question. These
6666
will be autocompleted as the user types::
6767

68-
$dialog = $this->getHelperSet()->get('dialog');
68+
$dialog = $this->getHelper('dialog');
6969
$bundleNames = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
7070
$name = $dialog->ask(
7171
$output,
@@ -83,7 +83,7 @@ Hiding the User's Response
8383
You can also ask a question and hide the response. This is particularly
8484
convenient for passwords::
8585

86-
$dialog = $this->getHelperSet()->get('dialog');
86+
$dialog = $this->getHelper('dialog');
8787
$password = $dialog->askHiddenResponse(
8888
$output,
8989
'What is the database password?',
@@ -154,7 +154,7 @@ Validating a Hidden Response
154154

155155
You can also ask and validate a hidden response::
156156

157-
$dialog = $this->getHelperSet()->get('dialog');
157+
$dialog = $this->getHelper('dialog');
158158

159159
$validator = function ($value) {
160160
if ('' === trim($value)) {
@@ -192,7 +192,7 @@ Instead, you can use the
192192
method, which makes sure that the user can only enter a valid string
193193
from a predefined list::
194194

195-
$dialog = $this->getHelperSet()->get('dialog');
195+
$dialog = $this->getHelper('dialog');
196196
$colors = array('red', 'blue', 'yellow');
197197

198198
$color = $dialog->select(

components/console/helpers/formatterhelper.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The :class:`Symfony\\Component\\Console\\Helper\\FormatterHelper` is included
1212
in the default helper set, which you can get by calling
1313
:method:`Symfony\\Component\\Console\\Command\\Command::getHelperSet`::
1414

15-
$formatter = $this->getHelperSet()->get('formatter');
15+
$formatter = $this->getHelper('formatter');
1616

1717
The methods return a string, which you'll usually render to the console by
1818
passing it to the

components/console/helpers/progresshelper.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ information, which updates as your command runs:
1818
To display progress details, use the :class:`Symfony\\Component\\Console\\Helper\\ProgressHelper`,
1919
pass it a total number of units, and advance the progress as your command executes::
2020

21-
$progress = $this->getHelperSet()->get('progress');
21+
$progress = $this->getHelper('progress');
2222

2323
$progress->start($output, 50);
2424
$i = 0;

components/console/helpers/tablehelper.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ When building a console application it may be useful to display tabular data:
1414
To display a table, use the :class:`Symfony\\Component\\Console\\Helper\\TableHelper`,
1515
set headers, rows and render::
1616

17-
$table = $this->getHelperSet()->get('table');
17+
$table = $this->getHelper('table');
1818
$table
1919
->setHeaders(array('ISBN', 'Title', 'Author'))
2020
->setRows(array(

0 commit comments

Comments
 (0)