protected function configure()
{
if ($this->name) {
$this->setName($this->name);
}
if ($this->description) {
$this->setDescription($this->description);
}
// add default options
$this->addOption('environment', null, InputOption::VALUE_REQUIRED, 'Craft environment name');
// We will loop through all of the arguments and options for the command and
// set them all on the base command instance. This specifies what can get
// passed into these commands as "parameters" to control the execution.
foreach ($this->getArguments() as $arguments) {
call_user_func_array([$this, 'addArgument'], $arguments);
}
foreach ($this->getOptions() as $options) {
call_user_func_array([$this, 'addOption'], $options);
}
}