[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch

title

Body

[close]

/vendor/symfony/console/Input/ -> ArgvInput.php (summary)

(no description)

File Size: 370 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ArgvInput:: (13 methods):
  __construct()
  setTokens()
  parse()
  parseShortOption()
  parseShortOptionSet()
  parseLongOption()
  parseArgument()
  addShortOption()
  addLongOption()
  getFirstArgument()
  hasParameterOption()
  getParameterOption()
  __toString()


Class: ArgvInput  - X-Ref

ArgvInput represents an input coming from the CLI arguments.

Usage:

$input = new ArgvInput();

By default, the `$_SERVER['argv']` array is used for the input values.

This can be overridden by explicitly passing the input values in the constructor:

$input = new ArgvInput($_SERVER['argv']);

If you pass it yourself, don't forget that the first element of the array
is the name of the running application.

When passing an argument to the constructor, be sure that it respects
the same rules as the argv one. It's almost always better to use the
`StringInput` when you want to provide your own input.

__construct(array $argv = null, InputDefinition $definition = null)   X-Ref

param: array|null           $argv       An array of parameters from the CLI (in the argv format)
param: InputDefinition|null $definition A InputDefinition instance

setTokens(array $tokens)   X-Ref
No description

parse()   X-Ref
{@inheritdoc}


parseShortOption($token)   X-Ref
Parses a short option.

param: string $token The current token

parseShortOptionSet($name)   X-Ref
Parses a short option set.

param: string $name The current token

parseLongOption($token)   X-Ref
Parses a long option.

param: string $token The current token

parseArgument($token)   X-Ref
Parses an argument.

param: string $token The current token

addShortOption($shortcut, $value)   X-Ref
Adds a short option value.

param: string $shortcut The short option key
param: mixed  $value    The value for the option

addLongOption($name, $value)   X-Ref
Adds a long option value.

param: string $name  The long option key
param: mixed  $value The value for the option

getFirstArgument()   X-Ref
{@inheritdoc}


hasParameterOption($values, $onlyParams = false)   X-Ref
{@inheritdoc}


getParameterOption($values, $default = false, $onlyParams = false)   X-Ref
{@inheritdoc}


__toString()   X-Ref
Returns a stringified representation of the args passed to the command.

return: string



Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1