Copied!
CloneableFinalInstantiable
Constants
public Symfony\Component\Console\Command\Command::FAILURE = 1
public Symfony\Component\Console\Command\Command::INVALID = 2
public Symfony\Component\Console\Command\Command::SUCCESS = 0
Properties
public array $arguments
 
  • var array<string,mixed>
public readonly Symfony\Component\Console\Command\Command $command
public string $duration = 'n/a'
public int $exitCode
public array $handledSignals = []
public bool $ignoreValidation
public Symfony\Component\Console\Input\InputInterface $input
public array $interactiveInputs = []
 
  • var array<string,mixed>
public ?int $interruptedBySignal = NULL
public bool $isInteractive = false
public string $maxMemoryUsage = 'n/a'
public array $options
 
  • var array<string,mixed>
public Symfony\Component\Console\Output\OutputInterface $output
Methods
public __call(string $name, array $arguments) : ?mixed
public __construct(Symfony\Component\Console\Command\Command $command, Symfony\Component\Stopwatch\Stopwatch $stopwatch)
public addArgument(string $name, ?int $mode = NULL, string $description = '', ?mixed $default = NULL, Closure|array $suggestedValues = []) : static
public addOption(string $name, array|string|?null $shortcut = NULL, ?int $mode = NULL, string $description = '', ?mixed $default = NULL, Closure|array $suggestedValues = []) : static
public addUsage(string $usage) : static
public complete(Symfony\Component\Console\Completion\CompletionInput $input, Symfony\Component\Console\Completion\CompletionSuggestions $suggestions) : void
public Symfony\Component\Console\Command\Command::getAliases() : array
 

Returns the aliases for the command.

public getApplication() : ?Symfony\Component\Console\Application
public static Symfony\Component\Console\Command\Command::getDefaultDescription() : ?string
public static Symfony\Component\Console\Command\Command::getDefaultName() : ?string
public getDefinition() : Symfony\Component\Console\Input\InputDefinition
public Symfony\Component\Console\Command\Command::getDescription() : string
 

Returns the description for the command.

public getHelp() : string
public getHelper(string $name) : Symfony\Component\Console\Helper\HelperInterface
public getHelperSet() : ?Symfony\Component\Console\Helper\HelperSet
public Symfony\Component\Console\Command\Command::getName() : ?string
 

Returns the command name.

public getNativeDefinition() : Symfony\Component\Console\Input\InputDefinition
public getProcessedHelp() : string
public getSubscribedSignals() : array
public getSynopsis(bool $short = false) : string
public getUsages() : array
public handleSignal(int $signal, int|false $previousExitCode = 0) : int|false
public ignoreValidationErrors() : void
 

This is mainly useful for the help command.

public isEnabled() : bool
public Symfony\Component\Console\Command\Command::isHidden() : bool
 
  • return bool whether the command should be publicly shown or not
public mergeApplicationDefinition(bool $mergeArgs = true) : void
 
  • internal
public run(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) : int
public Symfony\Component\Console\Command\Command::setAliases(iterable $aliases) : static
 

Sets the aliases for the command.

  • param string[] $aliases An array of aliases for the command
  • return $this
  • throws \InvalidArgumentException When an alias is invalid
public setApplication(?Symfony\Component\Console\Application $application = NULL) : void
public setCode(callable $code) : static
 

If this method is used, it overrides the code defined in the execute() method.

  • param callable $code A callable(InputInterface $input, OutputInterface $output)
  • return $this
  • throws \InvalidArgumentException
  • see \execute()
public setDefinition(Symfony\Component\Console\Input\InputDefinition|array $definition) : static
public Symfony\Component\Console\Command\Command::setDescription(string $description) : static
 

Sets the description for the command.

  • return $this
public setHelp(string $help) : static
public setHelperSet(Symfony\Component\Console\Helper\HelperSet $helperSet) : void
public Symfony\Component\Console\Command\Command::setHidden(bool $hidden = true) : static
 
  • param bool $hidden Whether or not the command should be hidden from the list of commands
  • return $this
public Symfony\Component\Console\Command\Command::setName(string $name) : static
 

Sets the name of the command.

This method can set both the namespace and the name if you separate them by a colon (:)

$command->setName('foo:bar');
  • return $this
  • throws \InvalidArgumentException When the name is invalid
public setProcessTitle(string $title) : static
 

This feature should be used only when creating a long process command, like a daemon.

  • return $this
Methods
protected Symfony\Component\Console\Command\Command::configure()
 

Configures the current command.

  • return void
protected execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) : int
protected initialize(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) : void
protected interact(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) : void
Properties
private readonly Symfony\Component\Stopwatch\Stopwatch $stopwatch
Methods
private extractInteractiveInputs(array $arguments, array $options) : void
Methods
public static Symfony\Component\Console\Command\Command::getDefaultDescription() : ?string
public static Symfony\Component\Console\Command\Command::getDefaultName() : ?string
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration