function ArrayInput::hasParameterOption
Overrides InputInterface::hasParameterOption
File
-
vendor/
symfony/ console/ Input/ ArrayInput.php, line 48
Class
- ArrayInput
- ArrayInput represents an input provided as an array.
Namespace
Symfony\Component\Console\InputCode
public function hasParameterOption(string|array $values, bool $onlyParams = false) : bool {
$values = (array) $values;
foreach ($this->parameters as $k => $v) {
if (!\is_int($k)) {
$v = $k;
}
if ($onlyParams && '--' === $v) {
return false;
}
if (\in_array($v, $values)) {
return true;
}
}
return false;
}