aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/console/event/console_signal_event.rs
blob: 6d9633cdaaeafa0b509b3e893e3d61fef6d255a9 (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
29
30
//! ref: composer/vendor/symfony/console/Event/ConsoleSignalEvent.php

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
    }
}