diff options
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/component/console')
8 files changed, 17 insertions, 13 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/component/console/application.rs b/crates/shirabe-external-packages/src/symfony/component/console/application.rs index 65abce4..becf1a5 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/application.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/application.rs @@ -12,8 +12,8 @@ impl Application { pub fn run( &mut self, - _input: Option<&mut dyn InputInterface>, - _output: Option<&mut dyn OutputInterface>, + _input: Option<std::rc::Rc<std::cell::RefCell<dyn InputInterface>>>, + _output: Option<std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>>, ) -> anyhow::Result<i64> { todo!() } @@ -90,7 +90,11 @@ impl Application { todo!() } - pub fn render_throwable(&self, _exception: &anyhow::Error, _output: &mut dyn OutputInterface) { + pub fn render_throwable( + &self, + _exception: &anyhow::Error, + _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>, + ) { todo!() } diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/progress_bar.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/progress_bar.rs index 1b896f9..77bc4fd 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/helper/progress_bar.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/progress_bar.rs @@ -4,7 +4,7 @@ use crate::symfony::component::console::output::OutputInterface; pub struct ProgressBar; impl ProgressBar { - pub fn new(_output: &dyn OutputInterface, _max: i64) -> Self { + pub fn new(_output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>, _max: i64) -> Self { todo!() } diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/question_helper.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/question_helper.rs index 5c723c2..5d452c7 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/helper/question_helper.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/question_helper.rs @@ -9,8 +9,8 @@ pub struct QuestionHelper; impl QuestionHelper { pub fn ask( &self, - _input: &mut dyn InputInterface, - _output: &mut dyn OutputInterface, + _input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>, + _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>, _question: &Question, ) -> Option<PhpMixed> { todo!() diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs index ca8b292..f580965 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs @@ -5,7 +5,7 @@ use shirabe_php_shim::PhpMixed; pub struct Table; impl Table { - pub fn new(_output: &dyn OutputInterface) -> Self { + pub fn new(_output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>) -> Self { todo!() } diff --git a/crates/shirabe-external-packages/src/symfony/component/console/input/input_interface.rs b/crates/shirabe-external-packages/src/symfony/component/console/input/input_interface.rs index f38d524..a556198 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/input/input_interface.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/input/input_interface.rs @@ -1,6 +1,6 @@ use shirabe_php_shim::PhpMixed; -pub trait InputInterface { +pub trait InputInterface: std::fmt::Debug { fn get_first_argument(&self) -> Option<String>; fn has_parameter_option(&self, values: &[&str], only_params: bool) -> bool; fn get_parameter_option( diff --git a/crates/shirabe-external-packages/src/symfony/component/console/output/console_output.rs b/crates/shirabe-external-packages/src/symfony/component/console/output/console_output.rs index 332cbd1..00b9324 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/output/console_output.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/output/console_output.rs @@ -16,11 +16,11 @@ impl ConsoleOutput { } impl ConsoleOutputInterface for ConsoleOutput { - fn get_error_output(&self) -> &dyn OutputInterface { + fn get_error_output(&self) -> std::rc::Rc<std::cell::RefCell<dyn OutputInterface>> { todo!() } - fn set_error_output(&mut self, _error: Box<dyn OutputInterface>) { + fn set_error_output(&mut self, _error: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>) { todo!() } } diff --git a/crates/shirabe-external-packages/src/symfony/component/console/output/console_output_interface.rs b/crates/shirabe-external-packages/src/symfony/component/console/output/console_output_interface.rs index 8e68396..83ec1de 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/output/console_output_interface.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/output/console_output_interface.rs @@ -1,6 +1,6 @@ use crate::symfony::component::console::output::OutputInterface; pub trait ConsoleOutputInterface: OutputInterface { - fn get_error_output(&self) -> &dyn OutputInterface; - fn set_error_output(&mut self, error: Box<dyn OutputInterface>); + fn get_error_output(&self) -> std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>; + fn set_error_output(&mut self, error: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>); } diff --git a/crates/shirabe-external-packages/src/symfony/component/console/output/output_interface.rs b/crates/shirabe-external-packages/src/symfony/component/console/output/output_interface.rs index 11fb82e..9e58a3e 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/output/output_interface.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/output/output_interface.rs @@ -1,7 +1,7 @@ use crate::symfony::component::console::formatter::OutputFormatter; use crate::symfony::component::console::output::ConsoleOutputInterface; -pub trait OutputInterface { +pub trait OutputInterface: std::fmt::Debug { // PHP class semantics: OutputInterface methods take &self with interior mutability, // because output objects are shared by reference across the PHP code. fn write(&self, messages: &str, newline: bool, r#type: i64); |
