Returns the description for the command.
public getDescription ( ) : string | ||
return | string | The description for the command |
use Symfony\Component\Console\Command\Command; class MyCommand extends Command { protected function configure() { $this->setName('mycommand') ->setDescription('This command does something cool.'); } }In this example, we create a custom command `MyCommand` and set its name as `'mycommand'` using the `setName` method. We then use the `setDescription` method to provide a brief description of the command. By calling the `getDescription` method on this command, we will retrieve the string `'This command does something cool.'` as its description. This method is part of the `Command` class within the Symfony\Component\Console\Command namespace, which is part of the Symfony Console Component library.
public getDescription ( ) : string | ||
return | string | The description for the command |