Copied!
CloneableInstantiable
Properties
public string $description
public string $name
public array|string|?null $shortcut
Methods
public __construct(string $description = '', string $name = '', array|string|?null $shortcut = NULL, callable|array $suggestedValues = [])
 

Represents a console command --option definition.

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

  • param array|string|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
  • param (string|\Suggestion)[]|callable $suggestedValues The values used for input completion
public resolveValue(Symfony\Component\Console\Input\InputInterface $input) : ?mixed
 
  • internal
public toInputOption() : Symfony\Component\Console\Input\InputOption
 
  • internal
public static tryFrom(ReflectionParameter $parameter) : ?self
 
  • internal
Constants
private Symfony\Component\Console\Attribute\Option::ALLOWED_TYPES = ['string', 'bool', 'int', 'float', 'array']
private Symfony\Component\Console\Attribute\Option::ALLOWED_UNION_TYPES = ['bool|string', 'bool|int', 'bool|float']
Properties
private bool $allowNull = false
private array|string|int|float|bool|?null $default = NULL
private string $function = ''
private ?int $mode = NULL
private Closure|array $suggestedValues
private string $typeName = ''
Methods
private handleUnion(ReflectionUnionType $type) : self
Methods
public static tryFrom(ReflectionParameter $parameter) : ?self
 
  • internal
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration