getCommandName() защищенный метод

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
Результат string The command name
Пример #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);
 }
Пример #2
0
 protected function getCommandName(InputInterface $input)
 {
     try {
         return $this->find('server:' . $input->getFirstArgument())->getName();
     } catch (CommandNotFoundException $e) {
         return parent::getCommandName($input);
     }
 }
Пример #3
0
 public function getCommandName(InputInterface $input)
 {
     $name = parent::getCommandName($input);
     if (!$name || substr($name, 0, 1) === '-') {
         $name = 'bench';
     }
     return $name;
 }
Пример #4
0
 /**
  * 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);
 }
Пример #5
0
 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';
 }