Class ArgvInput
ArgvInput represents an input coming from the CLI arguments.
Usage: $input = new ArgvInput();
By default, the $_SERVER['argv']
array is used for the input values.
This can be overridden by explicitly passing the input values in the constructor: $input = new ArgvInput($_SERVER['argv']);
If you pass it yourself, don't forget that the first element of the array is the name of the running application.
When passing an argument to the constructor, be sure that it respects
the same rules as the argv one. It's almost always better to use the
StringInput
when you want to provide your own input.
- Symfony\Component\Console\Input\Input implements Symfony\Component\Console\Input\InputInterface
- Symfony\Component\Console\Input\ArgvInput
Direct known subclasses
Symfony\Component\Console\Input\StringInput
Namespace: Symfony\Component\Console\Input
Author: Fabien Potencier fabien@symfony.com
See: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
See: http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
Located at Input/ArgvInput.php
Author: Fabien Potencier fabien@symfony.com
See: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
See: http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
Located at Input/ArgvInput.php
public
|
#
__construct( array $argv = null,
Constructor. |
protected
|
|
protected
|
|
public
string
|
|
public
boolean
|
#
hasParameterOption( string|array $values )
Returns true if the raw parameters (not parsed) contain a value. |
public
mixed
|
#
getParameterOption( string|array $values, mixed $default = false )
Returns the value of a raw option (not parsed). |
public
string
|
$arguments,
$definition,
$interactive,
$options
|