Symfony\Component\Console\Input\ArrayInput
ArrayInput represents an input provided as an array.
Usage:
$input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar'));
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class ArrayInput
extends Input
{
- // members
- private $parameters;
- // Inherited members from Input
- protected $definition;
- protected $options;
- protected $arguments;
- protected $interactive;
- // methods
- public void __construct()
- public string getFirstArgument()
- public Boolean hasParameterOption()
- public mixed getParameterOption()
- public string __toString()
- protected void parse()
- private void addShortOption()
- private void addLongOption()
- private void addArgument()
- // Inherited methods from Input
- public void __construct()
- public void bind()
- protected abstract void parse()
- public void validate()
- public Boolean isInteractive()
- public void setInteractive()
- public array getArguments()
- public mixed getArgument()
- public void setArgument()
- public Boolean hasArgument()
- public array getOptions()
- public mixed getOption()
- public void setOption()
- public Boolean hasOption()
- public string escapeToken()
Hierarchy
Members
private
- $parameters
protected
- $arguments
- $definition
- $interactive
- $options
Methods
private
- addArgument() — Adds an argument value.
- addLongOption() — Adds a long option value.
- addShortOption() — Adds a short option value.
protected
- parse() — Processes command line arguments.
public
- __construct() — Constructor.
- __toString() — Returns a stringified representation of the args passed to the command
- getFirstArgument() — Returns the first argument from the raw parameters (not parsed).
- getParameterOption() — Returns the value of a raw option (not parsed).
- hasParameterOption() — Returns true if the raw parameters (not parsed) contain a value.
Inherited from Symfony\Component\Console\Input\Input
protected
- parse() — Processes command line arguments.
public
- bind() — Binds the current Input instance with the given arguments and options.
- escapeToken() — Escapes a token through escapeshellarg if it contains unsafe chars
- getArgument() — Returns the argument value for a given argument name.
- getArguments() — Returns the argument values.
- getOption() — Returns the option value for a given option name.
- getOptions() — Returns the options values.
- hasArgument() — Returns true if an InputArgument object exists by name or position.
- hasOption() — Returns true if an InputOption object exists by name.
- isInteractive() — Checks if the input is interactive.
- setArgument() — Sets an argument value by name.
- setInteractive() — Sets the input interactivity.
- setOption() — Sets an option value by name.
- validate() — Validates the input.