[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

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

(no description)

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

Defines 1 class

ArgvInput:: (14 methods):
  __construct()
  setTokens()
  parse()
  parseToken()
  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
No description

setTokens(array $tokens)   X-Ref
No description

parse()   X-Ref
{@inheritdoc}


parseToken(string $token, bool $parseOptions)   X-Ref
No description

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


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


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


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


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


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


getFirstArgument()   X-Ref
{@inheritdoc}


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


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


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

return: string



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer