function Command::setName
Sets the name of the command.
This method can set both the namespace and the name if you separate them by a colon (:)
$command->setName('foo:bar');
Return value
$this
Throws
InvalidArgumentException When the name is invalid
2 calls to Command::setName()
- Command::__construct in vendor/
symfony/ console/ Command/ Command.php - SingleCommandApplication::run in vendor/
symfony/ console/ SingleCommandApplication.php - Runs the command.
File
-
vendor/
symfony/ console/ Command/ Command.php, line 452
Class
- Command
- Base class for all commands.
Namespace
Symfony\Component\Console\CommandCode
public function setName(string $name) : static {
$this->validateName($name);
$this->name = $name;
return $this;
}