class StringInput extends ArgvInput
StringInput represents an input provided as a string.
Usage:
$input = new StringInput('foo --bar="foobar"');
Constants
| REGEX_STRING |
|
| REGEX_QUOTED_STRING |
|
Methods
|
__construct(string $input, InputDefinition $definition = null)
Constructor. |
||
| string |
getFirstArgument()
Returns the first argument from the raw parameters (not parsed). |
from ArgvInput |
| Boolean |
hasParameterOption(string|array $values)
Returns true if the raw parameters (not parsed) contain a value. |
from ArgvInput |
| mixed |
getParameterOption(string|array $values, mixed $default = false)
Returns the value of a raw option (not parsed). |
from ArgvInput |
| string |
__toString()
Returns a stringified representation of the args passed to the command |
from ArgvInput |
Details
at line 40
public
__construct(string $input, InputDefinition $definition = null)
Constructor.
in ArgvInput at line 258
public string
getFirstArgument()
Returns the first argument from the raw parameters (not parsed).
in ArgvInput at line 279
public Boolean
hasParameterOption(string|array $values)
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.
in ArgvInput at line 303
public mixed
getParameterOption(string|array $values, mixed $default = false)
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.
in ArgvInput at line 328
public string
__toString()
Returns a stringified representation of the args passed to the command