Methods summary
public
string
|
#
getFirstArgument( )
Returns the first argument from the raw parameters (not parsed).
Returns the first argument from the raw parameters (not parsed).
Returns
string The value of the first argument or null otherwise
|
public
boolean
|
#
hasParameterOption( string|array $values )
Returns true if the raw parameters (not parsed) contain a value.
Returns true if the raw parameters (not parsed) contain a value.
This method is to be used to introspect the input parameters
before they have been validated. It must be used carefully.
Parameters
- $values
- The values to look for in the raw parameters (can be an array)
Returns
boolean true if the value is contained in the raw parameters
|
public
mixed
|
#
getParameterOption( string|array $values, mixed $default = false )
Returns the value of a raw option (not parsed).
Returns the value of a raw option (not parsed).
This method is to be used to introspect the input parameters
before they have been validated. It must be used carefully.
Parameters
- $values
- The value(s) to look for in the raw parameters (can be an array)
- $default
- The default value to return if no result is found
Returns
mixed The option value
|
public
|
#
bind( Symfony\Component\Console\Input\InputDefinition $definition )
Binds the current Input instance with the given arguments and options.
Binds the current Input instance with the given arguments and options.
Parameters
- $definition
- A InputDefinition instance
|
public
|
|
public
array
|
#
getArguments( )
Returns all the given arguments merged with the default values.
Returns all the given arguments merged with the default values.
Returns
array
|
public
mixed
|
#
getArgument( string $name )
Returns the argument value for a given argument name.
Returns the argument value for a given argument name.
Parameters
Returns
mixed The argument value
Throws
|
public
|
#
setArgument( string $name, string $value )
Sets an argument value by name.
Sets an argument value by name.
Parameters
- $name
- The argument name
- $value
- The argument value
Throws
|
public
boolean
|
#
hasArgument( string|integer $name )
Returns true if an InputArgument object exists by name or position.
Returns true if an InputArgument object exists by name or position.
Parameters
- $name
- The InputArgument name or position
Returns
boolean true if the InputArgument object exists, false otherwise
|
public
array
|
#
getOptions( )
Returns all the given options merged with the default values.
Returns all the given options merged with the default values.
Returns
array
|
public
mixed
|
#
getOption( string $name )
Returns the option value for a given option name.
Returns the option value for a given option name.
Parameters
Returns
mixed The option value
Throws
|
public
|
#
setOption( string $name, string|boolean $value )
Sets an option value by name.
Sets an option value by name.
Parameters
- $name
- The option name
- $value
- The option value
Throws
|
public
boolean
|
#
hasOption( string $name )
Returns true if an InputOption object exists by name.
Returns true if an InputOption object exists by name.
Parameters
- $name
- The InputOption name
Returns
boolean true if the InputOption object exists, false otherwise
|
public
boolean
|
#
isInteractive( )
Is this input means interactive?
Is this input means interactive?
Returns
boolean
|
public
|
#
setInteractive( boolean $interactive )
Sets the input interactivity.
Sets the input interactivity.
Parameters
- $interactive
- If the input should be interactive
|