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
string|array $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
string|array $values The value(s) to look for in the raw parameters (can be an array)
- $default
mixed $default The default value to return if no result is found
Returns
mixed The option value
|
public
|
|
public
|
#
validate( )
Validates if arguments given are correct.
Validates if arguments given are correct.
Throws an exception when not enough arguments are given.
Throws
|
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 )
Gets argument by name.
Parameters
- $name
string $name The name of the argument
Returns
mixed
|
public
|
#
setArgument( string $name, string $value )
Sets an argument value by name.
Sets an argument value by name.
Parameters
- $name
string $name The argument name
- $value
string $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
string|integer $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 )
Gets an option by name.
Parameters
- $name
string $name The name of the option
Returns
mixed
|
public
|
#
setOption( string $name, string $value )
Sets an option value by name.
Sets an option value by name.
Parameters
- $name
string $name The option name
- $value
string $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
string $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
Boolean $interactive If the input should be interactive
|