@@ -15,10 +15,10 @@ other batch jobs.
1515Installation
1616------------
1717
18- You can install the component inmany different ways:
18+ You can install the component in2 different ways:
1919
2020* Use the official Git repository (https://github.com/symfony/Console);
21- *:doc: `Install it via Composer</components/using_components> ` (``symfony/console `` on `Packagist `_).
21+ *:doc: `Install it via Composer </components/using_components >` (``symfony/console `` on `Packagist `_).
2222
2323..note ::
2424
@@ -229,6 +229,50 @@ The command can now be used in either of the following ways:
229229 $ app/console demo:greet Fabien
230230 $ app/console demo:greet Fabien Potencier
231231
232+ It is also possible to let an argument take a list of values (imagine you want
233+ to greet all your friends). For this it must be specified at the end of the
234+ argument list::
235+
236+ $this
237+ // ...
238+ ->addArgument(
239+ 'names',
240+ InputArgument::IS_ARRAY,
241+ 'Who do you want to greet (separate multiple names with a space)?'
242+ );
243+
244+ To use this, just specify as many names as you want:
245+
246+ ..code-block ::bash
247+
248+ $ app/console demo:greet Fabien Ryan Bernhard
249+
250+ You can access the ``names `` argument as an array::
251+
252+ if ($names = $input->getArgument('names')) {
253+ $text .= ' '.implode(', ', $names);
254+ }
255+
256+ There are 3 argument variants you can use:
257+
258+ =========================== ===============================================================================================================
259+ Option Value
260+ =========================== ===============================================================================================================
261+ InputArgument::REQUIRED The argument is required
262+ InputArgument::OPTIONAL The argument is optional and therefore can be omitted
263+ InputArgument::IS_ARRAY The argument can can contain an indefinite number of arguments and must be used at the end of the argument list
264+ =========================== ===============================================================================================================
265+
266+ You can combine ``IS_ARRAY `` with ``REQUIRED `` and ``OPTIONAL `` like this::
267+
268+ $this
269+ // ...
270+ ->addArgument(
271+ 'names',
272+ InputArgument::IS_ARRAY | InputArgument::REQUIRED,
273+ 'Who do you want to greet (separate multiple names with a space)?'
274+ );
275+
232276Using Command Options
233277---------------------
234278
@@ -297,7 +341,7 @@ InputOption::VALUE_REQUIRED This value is required (e.g. ``--iterations=5``), t
297341InputOption::VALUE_OPTIONAL This option may or may not have a value (e.g. ``yell `` or ``yell=loud ``)
298342=========================== =====================================================================================
299343
300- You can combine VALUE_IS_ARRAY with VALUE_REQUIRED or VALUE_OPTIONAL like this:
344+ You can combine`` VALUE_IS_ARRAY `` with`` VALUE_REQUIRED `` or`` VALUE_OPTIONAL `` like this:
301345
302346..code-block ::php
303347