abstract class Command extends Command (View source)

Constants

RETURN_CODE_ON_FAILURE

The return code we should return when an exception is thrown while running the command.

Methods

run(InputInterface $input, OutputInterface $output)

{@inheritdoc}

writeError(OutputInterface $output, Exception|Throwable $error)

Write an exception.

addEnvOption()

Add the "env" option to the command options.

Details

run(InputInterface $input, OutputInterface $output)

{@inheritdoc}

Parameters

InputInterface $input
OutputInterface $output

protected writeError(OutputInterface $output, Exception|Throwable $error)

Write an exception.

Parameters

OutputInterface $output
Exception|Throwable $error

protected Command addEnvOption()

Add the "env" option to the command options.

Return Value

Command