blob: 9b8de26503a27c331ba2415c37cda11a66f75d45 (
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/src/Composer/Plugin/PreCommandRunEvent.php
// TODO(plugin): this event is part of the plugin API and is dispatched before a command runs
use shirabe_external_packages::symfony::console::input::input_interface::InputInterface;
use crate::event_dispatcher::event::Event;
pub struct PreCommandRunEvent {
inner: Event,
input: Box<dyn InputInterface>,
command: String,
}
impl PreCommandRunEvent {
pub fn new(name: String, input: Box<dyn InputInterface>, command: String) -> Self {
let inner = Event::new(name);
Self {
inner,
input,
command,
}
}
pub fn get_input(&self) -> &dyn InputInterface {
self.input.as_ref()
}
pub fn get_command(&self) -> &str {
&self.command
}
}
|