\app\framework\Component\Console\InputInput

Input is the base class for all concrete Input classes.

Summary

Methods
Properties
Constants
__construct()
bind()
validate()
isInteractive()
setInteractive()
getArguments()
getArgument()
setArgument()
hasArgument()
getOptions()
getOption()
setOption()
hasOption()
escapeToken()
No public properties found
No constants found
parse()
$definition
$options
$arguments
$interactive
N/A
No private methods found
No private properties found
N/A

Properties

$definition

$definition : 

Type

$options

$options : 

Type

$arguments

$arguments : 

Type

$interactive

$interactive : 

Type

Methods

validate()

validate() 

Validates the input.

isInteractive()

isInteractive() : boolean

Is this input means interactive?

Returns

boolean

setInteractive()

setInteractive(boolean  $interactive) 

Sets the input interactivity.

Parameters

boolean $interactive

If the input should be interactive

getArguments()

getArguments() : array

Returns all the given arguments merged with the default values.

Returns

array

getArgument()

getArgument(string  $name) : mixed

Returns the argument value for a given argument name.

Parameters

string $name

The argument name

Returns

mixed —

The argument value

setArgument()

setArgument(string  $name, string  $value) 

Sets an argument value by name.

Parameters

string $name

The argument name

string $value

The argument value

hasArgument()

hasArgument(string|integer  $name) : boolean

Returns true if an InputArgument object exists by name or position.

Parameters

string|integer $name

The InputArgument name or position

Returns

boolean —

true if the InputArgument object exists, false otherwise

getOptions()

getOptions() : array

Returns all the given options merged with the default values.

Returns

array

getOption()

getOption(string  $name) : mixed

Returns the option value for a given option name.

Parameters

string $name

The option name

Returns

mixed —

The option value

setOption()

setOption(string  $name, string|boolean  $value) 

Sets an option value by name.

Parameters

string $name

The option name

string|boolean $value

The option value

hasOption()

hasOption(string  $name) : boolean

Returns true if an InputOption object exists by name.

Parameters

string $name

The InputOption name

Returns

boolean —

true if the InputOption object exists, false otherwise

escapeToken()

escapeToken(string  $token) : string

Escapes a token through escapeshellarg if it contains unsafe chars.

Parameters

string $token

Returns

string

parse()

parse() 

Process command line arguments.