InputDefinition::addOption()

addOption(InputOption $option) Adds an InputOption object. Parameters InputOption $option An InputOption object Exceptions LogicException When option given already exist

InputDefinition::addArguments()

addArguments(InputArgument[] $arguments = array()) Adds an array of InputArgument objects. Parameters InputArgument[] $arguments An array of InputArgument objects

InputDefinition::addArgument()

addArgument(InputArgument $argument) Adds an InputArgument object. Parameters InputArgument $argument An InputArgument object Exceptions LogicException When incorrect argument is given

InputDefinition

class InputDefinition A InputDefinition represents a set of valid command line arguments and options. Usage: $definition = new InputDefinition(array( new InputArgument('name', InputArgument::REQUIRED), new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), )); Methods __construct(array $definition = array()) Constructor. setDefinition(array $definition) Sets the definition of the input. setArguments(InputArgument[] $arguments = array()) Sets the InputArgument objects.

InputAwareInterface

interface InputAwareInterface InputAwareInterface should be implemented by classes that depends on the Console Input. Methods setInput(InputInterface $input) Sets the Console Input. Details setInput(InputInterface $input) Sets the Console Input. Parameters InputInterface $input

InputAwareHelper

class InputAwareHelper extends Helper implements InputAwareInterface An implementation of InputAwareInterface for Helpers. Methods setHelperSet(HelperSet $helperSet = null) Sets the helper set associated with this helper. from Helper HelperSet getHelperSet() Gets the helper set associated with this helper. from Helper static int strlen(string $string) Returns the length of a string, using mb_strlen if it is available. from Helper static formatTime($secs) from Helper static

InputArgument::setDefault()

setDefault(mixed $default = null) Sets the default value. Parameters mixed $default The default value Exceptions LogicException When incorrect default value is given

InputArgument::isRequired()

bool isRequired() Returns true if the argument is required. Return Value bool true if parameter mode is self::REQUIRED, false otherwise

InputArgument::isArray()

bool isArray() Returns true if the argument can take multiple values. Return Value bool true if mode is self::IS_ARRAY, false otherwise

InputArgument::getName()

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