protected function getDefaultInputDefinition() { $definition = parent::getDefaultInputDefinition(); $definition->addOption(Input\Option::create('--env', '', Input\Option::VALUE_REQUIRED, 'Set environment variable', 'dev')); return $definition; }
/** * Add an option * * @param Input\Option $option * @return Console */ public function addOption(Input\Option $option) { if ($option->hasLongName()) { $this->options[$option->getLongName()] = $option; } if ($option->hasShortName()) { $this->options[$option->getShortName()] = $option; } return $this; }