Documentation

Argument
in package

Attributes
#[Attribute]
\Attribute::TARGET_PARAMETER | \Attribute::TARGET_PROPERTY

Table of Contents

Constants

ALLOWED_TYPES  = ['string', 'bool', 'int', 'float', 'array']

Properties

$description  : string
$name  : string
$default  : string|bool|int|float|array<string|int, mixed>|null
$interactiveAttribute  : InteractiveAttributeInterface|null
$mode  : int|null
$suggestedValues  : array<string|int, mixed>|Closure
$typeName  : string|BackedEnum>

Methods

__construct()  : mixed
Represents a console command <argument> definition.

Constants

ALLOWED_TYPES

private mixed ALLOWED_TYPES = ['string', 'bool', 'int', 'float', 'array']

Properties

$description

public string $description = ''

$default

private string|bool|int|float|array<string|int, mixed>|null $default = null

$interactiveAttribute

private InteractiveAttributeInterface|null $interactiveAttribute = null

$suggestedValues

private array<string|int, mixed>|Closure $suggestedValues

$typeName

private string|BackedEnum> $typeName = ''

Methods

__construct()

Represents a console command <argument> definition.

public __construct([string $description = '' ][, string $name = '' ][, array<string|int, string|Suggestion>|callable(CompletionInput): array<int, string|Suggestion$suggestedValues = [] ]) : mixed

If unset, the name value will be inferred from the parameter definition.

Parameters
$description : string = ''
$name : string = ''
$suggestedValues : array<string|int, string|Suggestion>|callable(CompletionInput): array<int, string|Suggestion> = []

The values used for input completion


        
On this page

Search results