function Command::getSynopsis
Returns the synopsis for the command.
Parameters
bool $short Whether to show the short version of the synopsis (with options folded) or not:
2 methods override Command::getSynopsis()
- LazyCommand::getSynopsis in vendor/
symfony/ console/ Command/ LazyCommand.php - Returns the synopsis for the command.
- TraceableCommand::getSynopsis in vendor/
symfony/ console/ Command/ TraceableCommand.php - Returns the synopsis for the command.
File
-
vendor/
symfony/ console/ Command/ Command.php, line 601
Class
- Command
- Base class for all commands.
Namespace
Symfony\Component\Console\CommandCode
public function getSynopsis(bool $short = false) : string {
$key = $short ? 'short' : 'long';
if (!isset($this->synopsis[$key])) {
$this->synopsis[$key] = trim(\sprintf('%s %s', $this->name, $this->definition
->getSynopsis($short)));
}
return $this->synopsis[$key];
}