Symfony\Component\Console\Application::getCommandName PHP Method

getCommandName() protected method

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
    protected function getCommandName(InputInterface $input)
    {
        return $this->singleCommand ? $this->defaultCommand : $input->getFirstArgument();
    }

Usage Example

Example #1
0
 /**
  * @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);
 }
All Usage Examples Of Symfony\Component\Console\Application::getCommandName