public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null, $question = null) { parent::__construct($name, $shortcut, $mode, $description, $default); $this->name = $name; $this->question = $question; $this->default = $default; }
/** * Constructor. * * @param string $name The option name * @param string $description A description text * * @api */ public function __construct($name, $description = '') { if ('--' === substr($name, 0, 2)) { $name = substr($name, 2); } $this->name = $name; $this->description = $description; parent::__construct($name, null, InputOption::VALUE_OPTIONAL, $description, null); }
public function __construct($config_path, $name, $shortcut = null, $mode = null, $description = '', $default = null, $required = true, $callback = null) { parent::__construct($name, $shortcut, $mode, $description, $default); if (empty($config_path)) { throw new \InvalidArgumentException(sprintf('The config option "%s" is not mapped to a configuration parameter.', $name)); } $this->config_path = $config_path; $this->required = $required; $this->callback = $callback; }
/** * Constructor * * @param string $name * @param string $frontendType * @param int $mode * @param string $configPath * @param string $description * @param string|array|null $defaultValue * @param string|array|null $shortcut */ public function __construct($name, $frontendType, $mode, $configPath, $description = '', $defaultValue = null, $shortcut = null) { $this->frontendType = $frontendType; $this->configPath = $configPath; parent::__construct($name, $shortcut, $mode, $description, $defaultValue); }