Abstract Class Symfony\Component\Console\Input\Input

SubclassesSymfony\Component\Console\Input\ArgvInput, Symfony\Component\Console\Input\ArrayInput, Symfony\Component\Console\Input\StringInput

Input is the base class for all concrete Input classes.

Three concrete classes are provided by default:

  • ArgvInput: The input comes from the CLI arguments (argv)
  • StringInput: The input is provided as a string
  • ArrayInput: The input is provided as an array

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
parse() Processes command line arguments. Symfony\Component\Console\Input\Input

Property Details

$arguments protected property
protected $arguments = []
$definition protected property
$interactive protected property
protected $interactive true
$options protected property
protected $options = []

Method Details

__construct() public method


public void __construct ( Symfony\Component\Console\Input\InputDefinition $definition null )
$definition Symfony\Component\Console\Input\InputDefinition|null

A InputDefinition instance

bind() public method


public void bind ( Symfony\Component\Console\Input\InputDefinition $definition )
escapeToken() public method

Escapes a token through escapeshellarg if it contains unsafe chars.

public string escapeToken ( $token )
$token string
getArgument() public method


public void getArgument ( $name )
getArguments() public method


public void getArguments ( )
getOption() public method


public void getOption ( $name )
getOptions() public method


public void getOptions ( )
hasArgument() public method


public void hasArgument ( $name )
hasOption() public method


public void hasOption ( $name )
isInteractive() public method


public void isInteractive ( )
parse() protected abstract method

Processes command line arguments.

protected abstract void parse ( )
setArgument() public method


public void setArgument ( $name, $value )
setInteractive() public method


public void setInteractive ( $interactive )
setOption() public method


public void setOption ( $name, $value )
validate() public method


public void validate ( )