Input\InputArgument (Component\Console)
Symfony\Component\Console\Input\InputArgument
class InputArgument
Represents a command line argument.
Constants
REQUIRED | |
OPTIONAL | |
IS_ARRAY |
Methods
__construct(string $name, int $mode = null, string $description = '', mixed $default = null) Constructor. | ||
string | getName() Returns the argument name. | |
bool | isRequired() Returns true if the argument is required. | |
bool | isArray() Returns true if the argument can take multiple values. | |
setDefault(mixed $default = null) Sets the default value. | ||
mixed | getDefault() Returns the default value. | |
string | getDescription() Returns the description text. |
Details
public __construct(string $name, int $mode = null, string $description = '', mixed $default = null)
Constructor.
public string getName()
Returns the argument name.
public bool isRequired()
Returns true if the argument is required.
public bool isArray()
Returns true if the argument can take multiple values.
public setDefault(mixed $default = null)
Sets the default value.
public mixed getDefault()
Returns the default value.
public string getDescription()
Returns the description text.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Console/Input/InputArgument.html