@@ -88,7 +88,7 @@ if you want to know a bundle name, you can add this to your command::
88
88
89
89
// ... do something with the bundleName
90
90
91
- return Commande ::SUCCESS;
91
+ return Command ::SUCCESS;
92
92
}
93
93
94
94
The user will be asked "Please enter the name of the bundle". They can type
@@ -124,7 +124,7 @@ from a predefined list::
124
124
125
125
// ... do something with the color
126
126
127
- return Commande ::SUCCESS;
127
+ return Command ::SUCCESS;
128
128
}
129
129
130
130
.. versionadded :: 5.2
@@ -166,7 +166,7 @@ this use :method:`Symfony\\Component\\Console\\Question\\ChoiceQuestion::setMult
166
166
$colors = $helper->ask($input, $output, $question);
167
167
$output->writeln('You have just selected: ' . implode(', ', $colors));
168
168
169
- return Commande ::SUCCESS;
169
+ return Command ::SUCCESS;
170
170
}
171
171
172
172
Now, when the user enters ``1,2 ``, the result will be:
@@ -197,7 +197,7 @@ will be autocompleted as the user types::
197
197
198
198
// ... do something with the bundleName
199
199
200
- return Commande ::SUCCESS;
200
+ return Command ::SUCCESS;
201
201
}
202
202
203
203
In more complex use cases, it may be necessary to generate suggestions on the
@@ -236,7 +236,7 @@ provide a callback function to dynamically generate suggestions::
236
236
237
237
// ... do something with the filePath
238
238
239
- return Commande ::SUCCESS;
239
+ return Command ::SUCCESS;
240
240
}
241
241
242
242
Do not Trim the Answer
@@ -260,7 +260,7 @@ You can also specify if you want to not trim the answer by setting it directly w
260
260
261
261
// ... do something with the name
262
262
263
- return Commande ::SUCCESS;
263
+ return Command ::SUCCESS;
264
264
}
265
265
266
266
Accept Multiline Answers
@@ -291,7 +291,7 @@ the response to a question should allow multiline answers by passing ``true`` to
291
291
292
292
// ... do something with the answer
293
293
294
- return Commande ::SUCCESS;
294
+ return Command ::SUCCESS;
295
295
}
296
296
297
297
Multiline questions stop reading user input after receiving an end-of-transmission
@@ -319,7 +319,7 @@ convenient for passwords::
319
319
320
320
// ... do something with the password
321
321
322
- return Commande ::SUCCESS;
322
+ return Command ::SUCCESS;
323
323
}
324
324
325
325
.. caution ::
@@ -351,7 +351,7 @@ convenient for passwords::
351
351
352
352
// ...
353
353
354
- return Commande ::SUCCESS;
354
+ return Command ::SUCCESS;
355
355
}
356
356
357
357
Normalizing the Answer
@@ -382,7 +382,7 @@ method::
382
382
383
383
// ... do something with the bundleName
384
384
385
- return Commande ::SUCCESS;
385
+ return Command ::SUCCESS;
386
386
}
387
387
388
388
.. caution ::
@@ -426,7 +426,7 @@ method::
426
426
427
427
// ... do something with the bundleName
428
428
429
- return Commande ::SUCCESS;
429
+ return Command ::SUCCESS;
430
430
}
431
431
432
432
The ``$validator `` is a callback which handles the validation. It should
@@ -488,7 +488,7 @@ You can also use a validator with a hidden question::
488
488
489
489
// ... do something with the password
490
490
491
- return Commande ::SUCCESS;
491
+ return Command ::SUCCESS;
492
492
}
493
493
494
494
Testing a Command that Expects Input
0 commit comments