Documentation

AsCommand
in package

Service tag to autoconfigure commands.

Tags
final

since Symfony 7.3

Attributes
#[Attribute]
\Attribute::TARGET_CLASS

Table of Contents

Properties

$description  : string|null
$help  : string|null
$name  : string
$usages  : array<string|int, mixed>

Methods

__construct()  : mixed

Properties

$description

public string|null $description = null

$usages

public array<string|int, mixed> $usages = []

Methods

__construct()

public __construct(string $name[, string|null $description = null ][, array<string|int, string> $aliases = [] ][, bool $hidden = false ][, string|null $help = null ][, array<string|int, string> $usages = [] ]) : mixed
Parameters
$name : string

The name of the command, used when calling it (i.e. "cache:clear")

$description : string|null = null

The description of the command, displayed with the help page

$aliases : array<string|int, string> = []

The list of aliases of the command. The command will be executed when using one of them (i.e. "cache:clean")

$hidden : bool = false

If true, the command won't be shown when listing all the available commands, but it can still be run as any other command

$help : string|null = null

The help content of the command, displayed with the help page

$usages : array<string|int, string> = []

The list of usage examples, displayed with the help page


        
On this page

Search results