Class Symfony\Component\Console\Event\ConsoleTerminateEvent

InheritanceSymfony\Component\Console\Event\ConsoleTerminateEvent » Symfony\Component\Console\Event\ConsoleEvent » Symfony\Component\EventDispatcher\Event

Allows to manipulate the exit code of a command after its execution.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$command Symfony\Component\Console\Event\ConsoleEvent

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Symfony\Component\Console\Event\ConsoleTerminateEvent
getCommand() Gets the command that is executed. Symfony\Component\Console\Event\ConsoleEvent
getDispatcher() Returns the EventDispatcher that dispatches this Event. Symfony\Component\EventDispatcher\Event
getExitCode() Gets the exit code. Symfony\Component\Console\Event\ConsoleTerminateEvent
getInput() Gets the input instance. Symfony\Component\Console\Event\ConsoleEvent
getName() Gets the event's name. Symfony\Component\EventDispatcher\Event
getOutput() Gets the output instance. Symfony\Component\Console\Event\ConsoleEvent
isPropagationStopped() Returns whether further event listeners should be triggered. Symfony\Component\EventDispatcher\Event
setDispatcher() Stores the EventDispatcher that dispatches this Event. Symfony\Component\EventDispatcher\Event
setExitCode() Sets the exit code. Symfony\Component\Console\Event\ConsoleTerminateEvent
setName() Sets the event's name property. Symfony\Component\EventDispatcher\Event
stopPropagation() Stops the propagation of the event to further event listeners. Symfony\Component\EventDispatcher\Event

Method Details

__construct() public method

public void __construct ( Symfony\Component\Console\Command\Command $command, Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, $exitCode )
$command
$input
$output
$exitCode
getExitCode() public method

Gets the exit code.

public int getExitCode ( )
return int

The command exit code

setExitCode() public method

Sets the exit code.

public void setExitCode ( $exitCode )
$exitCode int

The command exit code