@@ -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
The option which should be selected by default is provided with the third
@@ -162,7 +162,7 @@ this use :method:`Symfony\\Component\\Console\\Question\\ChoiceQuestion::setMult
162
162
$colors = $helper->ask($input, $output, $question);
163
163
$output->writeln('You have just selected: ' . implode(', ', $colors));
164
164
165
- return Commande ::SUCCESS;
165
+ return Command ::SUCCESS;
166
166
}
167
167
168
168
Now, when the user enters ``1,2 ``, the result will be:
@@ -193,7 +193,7 @@ will be autocompleted as the user types::
193
193
194
194
// ... do something with the bundleName
195
195
196
- return Commande ::SUCCESS;
196
+ return Command ::SUCCESS;
197
197
}
198
198
199
199
In more complex use cases, it may be necessary to generate suggestions on the
@@ -232,7 +232,7 @@ provide a callback function to dynamically generate suggestions::
232
232
233
233
// ... do something with the filePath
234
234
235
- return Commande ::SUCCESS;
235
+ return Command ::SUCCESS;
236
236
}
237
237
238
238
Do not Trim the Answer
@@ -256,7 +256,7 @@ You can also specify if you want to not trim the answer by setting it directly w
256
256
257
257
// ... do something with the name
258
258
259
- return Commande ::SUCCESS;
259
+ return Command ::SUCCESS;
260
260
}
261
261
262
262
Accept Multiline Answers
@@ -282,7 +282,7 @@ the response to a question should allow multiline answers by passing ``true`` to
282
282
283
283
// ... do something with the answer
284
284
285
- return Commande ::SUCCESS;
285
+ return Command ::SUCCESS;
286
286
}
287
287
288
288
Multiline questions stop reading user input after receiving an end-of-transmission
@@ -310,7 +310,7 @@ convenient for passwords::
310
310
311
311
// ... do something with the password
312
312
313
- return Commande ::SUCCESS;
313
+ return Command ::SUCCESS;
314
314
}
315
315
316
316
.. caution ::
@@ -342,7 +342,7 @@ convenient for passwords::
342
342
343
343
// ...
344
344
345
- return Commande ::SUCCESS;
345
+ return Command ::SUCCESS;
346
346
}
347
347
348
348
Normalizing the Answer
@@ -373,7 +373,7 @@ method::
373
373
374
374
// ... do something with the bundleName
375
375
376
- return Commande ::SUCCESS;
376
+ return Command ::SUCCESS;
377
377
}
378
378
379
379
.. caution ::
@@ -417,7 +417,7 @@ method::
417
417
418
418
// ... do something with the bundleName
419
419
420
- return Commande ::SUCCESS;
420
+ return Command ::SUCCESS;
421
421
}
422
422
423
423
The ``$validator `` is a callback which handles the validation. It should
@@ -479,7 +479,7 @@ You can also use a validator with a hidden question::
479
479
480
480
// ... do something with the password
481
481
482
- return Commande ::SUCCESS;
482
+ return Command ::SUCCESS;
483
483
}
484
484
485
485
Testing a Command that Expects Input
0 commit comments