You are here

public function ArrayInput::getFirstArgument 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::getFirstArgument()

Returns the first argument from the raw parameters (not parsed).

Return value

string The value of the first argument or null otherwise

Overrides InputInterface::getFirstArgument

File

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

Class

ArrayInput
ArrayInput represents an input provided as an array.

Namespace

Symfony\Component\Console\Input

Code

public function getFirstArgument() {
  foreach ($this->parameters as $key => $value) {
    if ($key && '-' === $key[0]) {
      continue;
    }
    return $value;
  }
}