function ConsoleInputCollector::getInputFromOptions
Returns the `--input` options passed to the command.
Return value
string[] The values from the `--input` options passed to the command, keyed by fully qualified name (i.e., prefixed with the name of their defining recipe).
1 call to ConsoleInputCollector::getInputFromOptions()
- ConsoleInputCollector::collectValue in core/
lib/ Drupal/ Core/ Recipe/ ConsoleInputCollector.php
File
-
core/
lib/ Drupal/ Core/ Recipe/ ConsoleInputCollector.php, line 60
Class
- ConsoleInputCollector
- Collects input values for recipes from the command line.
Namespace
Drupal\Core\RecipeCode
private function getInputFromOptions() : array {
$options = [];
try {
foreach ($this->input
->getOption(static::INPUT_OPTION) ?? [] as $option) {
[
$key,
$value,
] = explode('=', $option, 2);
$options[$key] = $value;
}
} catch (InvalidArgumentException) {
// The option is undefined; there's nothing we need to do.
}
return $options;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.