class ConsoleTerminateEvent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Event/ConsoleTerminateEvent.php \Symfony\Component\Console\Event\ConsoleTerminateEvent
Allows to manipulate the exit code of a command after its execution.
@author Francesco Levorato <git@flevour.net>
Hierarchy
- class \Symfony\Component\EventDispatcher\Event
- class \Symfony\Component\Console\Event\ConsoleEvent
- class \Symfony\Component\Console\Event\ConsoleTerminateEvent
- class \Symfony\Component\Console\Event\ConsoleEvent
Expanded class hierarchy of ConsoleTerminateEvent
2 files declare their use of ConsoleTerminateEvent
- Application.php in vendor/
symfony/ console/ Application.php - ApplicationTest.php in vendor/
symfony/ console/ Tests/ ApplicationTest.php
File
- vendor/
symfony/ console/ Event/ ConsoleTerminateEvent.php, line 23
Namespace
Symfony\Component\Console\EventView source
class ConsoleTerminateEvent extends ConsoleEvent {
/**
* The exit code of the command.
*
* @var int
*/
private $exitCode;
public function __construct(Command $command, InputInterface $input, OutputInterface $output, $exitCode) {
parent::__construct($command, $input, $output);
$this
->setExitCode($exitCode);
}
/**
* Sets the exit code.
*
* @param int $exitCode The command exit code
*/
public function setExitCode($exitCode) {
$this->exitCode = (int) $exitCode;
}
/**
* Gets the exit code.
*
* @return int The command exit code
*/
public function getExitCode() {
return $this->exitCode;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConsoleEvent:: |
protected | property | ||
ConsoleEvent:: |
private | property | ||
ConsoleEvent:: |
private | property | ||
ConsoleEvent:: |
public | function | Gets the command that is executed. | |
ConsoleEvent:: |
public | function | Gets the input instance. | |
ConsoleEvent:: |
public | function | Gets the output instance. | |
ConsoleTerminateEvent:: |
private | property | The exit code of the command. | |
ConsoleTerminateEvent:: |
public | function | Gets the exit code. | |
ConsoleTerminateEvent:: |
public | function | Sets the exit code. | |
ConsoleTerminateEvent:: |
public | function |
Overrides ConsoleEvent:: |
|
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
public | function | Returns the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Gets the event's name. | |
Event:: |
public | function | Returns whether further event listeners should be triggered. | |
Event:: |
public | function | Stores the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Sets the event's name property. | |
Event:: |
public | function | Stops the propagation of the event to further event listeners. |