function Command::addUsage
Add a command usage example, it'll be prefixed with the command name.
Return value
$this
2 methods override Command::addUsage()
- LazyCommand::addUsage in vendor/
symfony/ console/ Command/ LazyCommand.php - Add a command usage example, it'll be prefixed with the command name.
- TraceableCommand::addUsage in vendor/
symfony/ console/ Command/ TraceableCommand.php - Add a command usage example, it'll be prefixed with the command name.
File
-
vendor/
symfony/ console/ Command/ Command.php, line 617
Class
- Command
- Base class for all commands.
Namespace
Symfony\Component\Console\CommandCode
public function addUsage(string $usage) : static {
if (!str_starts_with($usage, $this->name)) {
$usage = \sprintf('%s %s', $this->name, $usage);
}
$this->usages[] = $usage;
return $this;
}