You are here

public function Command::addUsage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Command/Command.php \Symfony\Component\Console\Command\Command::addUsage()

Add a command usage example.

Parameters

string $usage The usage, it'll be prefixed with the command name:

File

vendor/symfony/console/Command/Command.php, line 573

Class

Command
Base class for all commands.

Namespace

Symfony\Component\Console\Command

Code

public function addUsage($usage) {
  if (0 !== strpos($usage, $this->name)) {
    $usage = sprintf('%s %s', $this->name, $usage);
  }
  $this->usages[] = $usage;
  return $this;
}