class ConsoleTerminateEvent
Allows to manipulate the exit code of a command after its execution.
@author Francesco Levorato <git@flevour.net> @author Jules Pietri <jules@heahprod.com>
Hierarchy
- class \Symfony\Contracts\EventDispatcher\Event implements \Psr\EventDispatcher\StoppableEventInterface
- class \Symfony\Component\Console\Event\ConsoleEvent extends \Symfony\Contracts\EventDispatcher\Event
- class \Symfony\Component\Console\Event\ConsoleTerminateEvent extends \Symfony\Component\Console\Event\ConsoleEvent
- class \Symfony\Component\Console\Event\ConsoleEvent extends \Symfony\Contracts\EventDispatcher\Event
Expanded class hierarchy of ConsoleTerminateEvent
3 files declare their use of ConsoleTerminateEvent
- Application.php in vendor/
symfony/ console/ Application.php - ConsoleEvents.php in vendor/
symfony/ console/ ConsoleEvents.php - ErrorListener.php in vendor/
symfony/ console/ EventListener/ ErrorListener.php
File
-
vendor/
symfony/ console/ Event/ ConsoleTerminateEvent.php, line 24
Namespace
Symfony\Component\Console\EventView source
final class ConsoleTerminateEvent extends ConsoleEvent {
public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode, ?int $interruptingSignal = null) {
parent::__construct($command, $input, $output);
}
public function setExitCode(int $exitCode) : void {
$this->exitCode = $exitCode;
}
public function getExitCode() : int {
return $this->exitCode;
}
public function getInterruptingSignal() : ?int {
return $this->interruptingSignal;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ConsoleEvent::getCommand | public | function | Gets the command that is executed. | ||
ConsoleEvent::getInput | public | function | Gets the input instance. | ||
ConsoleEvent::getOutput | public | function | Gets the output instance. | ||
ConsoleTerminateEvent::getExitCode | public | function | |||
ConsoleTerminateEvent::getInterruptingSignal | public | function | |||
ConsoleTerminateEvent::setExitCode | public | function | |||
ConsoleTerminateEvent::__construct | public | function | Overrides ConsoleEvent::__construct | ||
Event::$propagationStopped | private | property | |||
Event::isPropagationStopped | public | function | Is propagation stopped? | Overrides StoppableEventInterface::isPropagationStopped | |
Event::stopPropagation | public | function | Stops the propagation of the event to further event listeners. | 1 |