Symfony\Component\Console\Command\Command::setName PHP Метод

setName() публичный Метод

This method can set both the namespace and the name if you separate them by a colon (:) $command->setName('foo:bar');
public setName ( string $name ) : Command
$name string The command name
Результат Command The current instance
    public function setName($name)
    {
        $this->validateName($name);
        $this->name = $name;
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * @param string $name
  * @return AbstractCommand
  */
 public function setName($name)
 {
     if (!$this->getName()) {
         return parent::setName($name);
     }
     return $this;
 }
All Usage Examples Of Symfony\Component\Console\Command\Command::setName