Symfony\Component\Console\Command\Command::getProcessedHelp PHP Method

getProcessedHelp() public method

Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
public getProcessedHelp ( ) : string
return string The processed help for the command
    public function getProcessedHelp()
    {
        $name = $this->name;
        $placeholders = array('%command.name%', '%command.full_name%');
        $replacements = array($name, $_SERVER['PHP_SELF'] . ' ' . $name);
        return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());
    }

Usage Example

Beispiel #1
0
 /**
  * Returns the processed and wrapped help.
  *
  * @return string The processed help.
  */
 public function getProcessedHelp()
 {
     // remove breaks for continuous lines
     $help = parent::getProcessedHelp();
     $help = preg_replace('/([^\\n])\\n([^\\n])/', '\\1 \\2', $help);
     return $this->wrap($help);
 }
All Usage Examples Of Symfony\Component\Console\Command\Command::getProcessedHelp