Gets the name of the command based on input.
protected getCommandName ( Symfony\Component\Console\Input\InputInterface $input ) : string | ||
$input | Symfony\Component\Console\Input\InputInterface | The input interface |
return | string | The command name |
/** * @param InputInterface $input L'interface de saisie * * @return string */ protected function getCommandName(InputInterface $input) { if (null !== $this->commandName) { return $this->commandName; } return parent::getCommandName($input); }
protected function getCommandName(InputInterface $input) { try { return $this->find('server:' . $input->getFirstArgument())->getName(); } catch (CommandNotFoundException $e) { return parent::getCommandName($input); } }
public function getCommandName(InputInterface $input) { $name = parent::getCommandName($input); if (!$name || substr($name, 0, 1) === '-') { $name = 'bench'; } return $name; }
/** * Gets the name of the command based on input. * * @param InputInterface $input The input interface * * @return string The command name */ protected function getCommandName(InputInterface $input) { if ($input->getFirstArgument() === null && !$input->hasParameterOption(array('--help', '-h'))) { $this->isDefault = true; return $this->getDefaultCommandName(); } return parent::getCommandName($input); }
protected function getCommandName(InputInterface $input) { $commandName = parent::getCommandName($input); if (is_null($commandName)) { return null; } else { if ($commandName == ApplicationContext::getInstance()->getEnvironment()->getPreloadScript()) { return null; } else { return $commandName; } } }
protected function getCommandName(InputInterface $input) { parent::getCommandName($input); return 'makes:cache:report'; }