InputOption::getName()

string getName() Returns the option name. Return Value string The name

InputOption::getDescription()

string getDescription() Returns the description text. Return Value string The description text

InputOption::getDefault()

mixed getDefault() Returns the default value. Return Value mixed The default value

InputOption::equals()

bool equals(InputOption $option) Checks whether the given option equals this one. Parameters InputOption $option option to compare Return Value bool

InputOption::acceptValue()

bool acceptValue() Returns true if the option accepts a value. Return Value bool true if value mode is not self::VALUE_NONE, false otherwise

InputOption

class InputOption Represents a command line option. Constants VALUE_NONE VALUE_REQUIRED VALUE_OPTIONAL VALUE_IS_ARRAY Methods __construct(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null) Constructor. string getShortcut() Returns the option shortcut. string getName() Returns the option name. bool acceptValue() Returns true if the option accepts a value. bool isValueRequired() Returns true

InputInterface::validate()

validate() Validates the input. Exceptions RuntimeException When not enough arguments are given

InputInterface::setOption()

setOption(string $name, string|bool $value) Sets an option value by name. Parameters string $name The option name string|bool $value The option value Exceptions InvalidArgumentException When option given doesn't exist

InputInterface::setInteractive()

setInteractive(bool $interactive) Sets the input interactivity. Parameters bool $interactive If the input should be interactive

InputInterface::setArgument()

setArgument(string $name, string $value) Sets an argument value by name. Parameters string $name The argument name string $value The argument value Exceptions InvalidArgumentException When argument given doesn't exist