You are here

private function ArgvInput::parseLongOption 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::parseLongOption()

Parses a long option.

Parameters

string $token The current token:

1 call to ArgvInput::parseLongOption()
ArgvInput::parse in vendor/symfony/console/Input/ArgvInput.php
Processes command line arguments.

File

vendor/symfony/console/Input/ArgvInput.php, line 143

Class

ArgvInput
ArgvInput represents an input coming from the CLI arguments.

Namespace

Symfony\Component\Console\Input

Code

private function parseLongOption($token) {
  $name = substr($token, 2);
  if (false !== ($pos = strpos($name, '='))) {
    $this
      ->addLongOption(substr($name, 0, $pos), substr($name, $pos + 1));
  }
  else {
    $this
      ->addLongOption($name, null);
  }
}