You are here

public function ArrayInput::hasParameterOption in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Input/ArrayInput.php \Symfony\Component\Console\Input\ArrayInput::hasParameterOption()

Returns true if the raw parameters (not parsed) contain a value.

This method is to be used to introspect the input parameters before they have been validated. It must be used carefully.

Parameters

string|array $values The values to look for in the raw parameters (can be an array):

Return value

bool true if the value is contained in the raw parameters

Overrides InputInterface::hasParameterOption

File

vendor/symfony/console/Input/ArrayInput.php, line 66

Class

ArrayInput
ArrayInput represents an input provided as an array.

Namespace

Symfony\Component\Console\Input

Code

public function hasParameterOption($values) {
  $values = (array) $values;
  foreach ($this->parameters as $k => $v) {
    if (!is_int($k)) {
      $v = $k;
    }
    if (in_array($v, $values)) {
      return true;
    }
  }
  return false;
}