aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/console/event/console_signal_event.rs
blob: 424285d8db3bf0cfd6b704027be09a66948997af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use super::console_event::ConsoleEvent;
use crate::symfony::console::command::command::Command;
use crate::symfony::console::input::input_interface::InputInterface;
use crate::symfony::console::output::output_interface::OutputInterface;

#[derive(Debug)]
pub struct ConsoleSignalEvent {
    inner: ConsoleEvent,
    handling_signal: i64,
}

impl ConsoleSignalEvent {
    pub fn new(
        command: Box<dyn Command>,
        input: Box<dyn InputInterface>,
        output: Box<dyn OutputInterface>,
        handling_signal: i64,
    ) -> Self {
        Self {
            inner: ConsoleEvent::new(Some(command), input, output),
            handling_signal,
        }
    }

    pub fn get_handling_signal(&self) -> i64 {
        self.handling_signal
    }
}