You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: console/input.rst
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -91,11 +91,12 @@ There are three argument variants you can use:
91
91
provided;
92
92
93
93
``InputArgument::OPTIONAL``
94
-
The argument is optional and therefore can be omitted. This is the default mode when you omit or pass null to the ``$mode`` parameter of the ``addArgument`` method;
94
+
The argument is optional and therefore can be omitted. This is the default
95
+
behavior of arguments;
95
96
96
97
``InputArgument::IS_ARRAY``
97
98
The argument can contain any number of values. For that reason, it must be
98
-
used at the end of the argument list
99
+
used at the end of the argument list.
99
100
100
101
You can combine ``IS_ARRAY`` with ``REQUIRED`` and ``OPTIONAL`` like this::
101
102
@@ -177,11 +178,15 @@ There are four option variants you can use:
177
178
178
179
``InputOption::VALUE_IS_ARRAY``
179
180
This option accepts multiple values (e.g. ``--dir=/foo --dir=/bar``);
181
+
180
182
``InputOption::VALUE_NONE``
181
-
Do not accept input for this option (e.g. ``--yell``). This is the default mode when you omit or pass null to the ``$mode`` parameter of the ``addOption`` method;
183
+
Do not accept input for this option (e.g. ``--yell``). This is the default
184
+
behavior of options;
185
+
182
186
``InputOption::VALUE_REQUIRED``
183
187
This value is required (e.g. ``--iterations=5``), the option itself is
184
188
still optional;
189
+
185
190
``InputOption::VALUE_OPTIONAL``
186
191
This option may or may not have a value (e.g. ``--yell`` or
0 commit comments