You are here

public function ArgvInput::getFirstArgument 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::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/ArgvInput.php, line 258

Class

ArgvInput
ArgvInput represents an input coming from the CLI arguments.

Namespace

Symfony\Component\Console\Input

Code

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