function ArrayInput::parse
Overrides Input::parse
File
-
vendor/
symfony/ console/ Input/ ArrayInput.php, line 114
Class
- ArrayInput
- ArrayInput represents an input provided as an array.
Namespace
Symfony\Component\Console\InputCode
protected function parse() : void {
foreach ($this->parameters as $key => $value) {
if ('--' === $key) {
return;
}
if (str_starts_with($key, '--')) {
$this->addLongOption(substr($key, 2), $value);
}
elseif (str_starts_with($key, '-')) {
$this->addShortOption(substr($key, 1), $value);
}
else {
$this->addArgument($key, $value);
}
}
}