You are here

public function ArgvInput::hasParameterOption in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Input/ArgvInput.php \Symfony\Component\Console\Input\ArgvInput::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 value(s) 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/ArgvInput.php, line 279

Class

ArgvInput
ArgvInput represents an input coming from the CLI arguments.

Namespace

Symfony\Component\Console\Input

Code

public function hasParameterOption($values) {
  $values = (array) $values;
  foreach ($this->tokens as $token) {
    foreach ($values as $value) {
      if ($token === $value || 0 === strpos($token, $value . '=')) {
        return true;
      }
    }
  }
  return false;
}