Symfony\Component\Console\Input\InputOption
Represents a command line option.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class InputOption
{
- // constants
- const VALUE_NONE = 1;
- const VALUE_REQUIRED = 2;
- const VALUE_OPTIONAL = 4;
- const VALUE_IS_ARRAY = 8;
- // members
- private $name;
- private $shortcut;
- private $mode;
- private $default;
- private $description;
- // methods
- public void __construct()
- public string getShortcut()
- public string getName()
- public Boolean acceptValue()
- public Boolean isValueRequired()
- public Boolean isValueOptional()
- public Boolean isArray()
- public void setDefault()
- public mixed getDefault()
- public string getDescription()
- public Boolean equals()
Constants
Name | Value |
---|---|
VALUE_NONE | 1 |
VALUE_REQUIRED | 2 |
VALUE_OPTIONAL | 4 |
VALUE_IS_ARRAY | 8 |
Members
private
- $default
- $description
- $mode
- $name
- $shortcut
Methods
public
- __construct() — Constructor.
- acceptValue() — Returns true if the option accepts a value.
- equals() — Checks whether the given option equals this one
- getDefault() — Returns the default value.
- getDescription() — Returns the description text.
- getName() — Returns the option name.
- getShortcut() — Returns the option shortcut.
- isArray() — Returns true if the option can take multiple values.
- isValueOptional() — Returns true if the option takes an optional value.
- isValueRequired() — Returns true if the option requires a value.
- setDefault() — Sets the default value.