Symfony\Component\Console\Command\Command::setName PHP Method

setName() public method

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
return Command The current instance
    public function setName($name)
    {
        $this->validateName($name);
        $this->name = $name;
        return $this;
    }

Usage Example

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