Abstract Class Symfony\Component\Console\Input\Input

InheritanceSymfony\Component\Console\Input\Input
ImplementsSymfony\Component\Console\Input\InputInterface
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

Constructor.

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

A InputDefinition instance

bind() public method

{@inheritdoc}

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

Escapes a token through escapeshellarg if it contains unsafe chars.

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

{@inheritdoc}

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

{@inheritdoc}

public void getArguments ( )
getOption() public method

{@inheritdoc}

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

{@inheritdoc}

public void getOptions ( )
hasArgument() public method

{@inheritdoc}

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

{@inheritdoc}

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

{@inheritdoc}

public void isInteractive ( )
parse() protected abstract method

Processes command line arguments.

protected abstract void parse ( )
setArgument() public method

{@inheritdoc}

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

{@inheritdoc}

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

{@inheritdoc}

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

{@inheritdoc}

public void validate ( )