function Command::getProcessedHelp
Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
2 methods override Command::getProcessedHelp()
- LazyCommand::getProcessedHelp in vendor/
symfony/ console/ Command/ LazyCommand.php - Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
- TraceableCommand::getProcessedHelp in vendor/
symfony/ console/ Command/ TraceableCommand.php - Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
File
-
vendor/
symfony/ console/ Command/ Command.php, line 548
Class
- Command
- Base class for all commands.
Namespace
Symfony\Component\Console\CommandCode
public function getProcessedHelp() : string {
$name = $this->name;
$isSingleCommand = $this->application?->isSingleCommand();
$placeholders = [
'%command.name%',
'%command.full_name%',
];
$replacements = [
$name,
$isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'] . ' ' . $name,
];
return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());
}