diff options
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/component')
54 files changed, 1203 insertions, 0 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 new file mode 100644 index 0000000..760e609 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/application.rs @@ -0,0 +1,88 @@ +use shirabe_php_shim::PhpMixed; +use crate::symfony::component::console::input::input_interface::InputInterface; +use crate::symfony::component::console::output::output_interface::OutputInterface; + +#[derive(Debug)] +pub struct Application; + +impl Application { + pub fn new(name: &str, version: &str) -> Self { + todo!() + } + + pub fn run( + &mut self, + input: Option<&mut dyn InputInterface>, + output: Option<&mut dyn OutputInterface>, + ) -> anyhow::Result<i64> { + todo!() + } + + pub fn set_name(&mut self, name: &str) { + todo!() + } + + pub fn get_name(&self) -> String { + todo!() + } + + pub fn set_version(&mut self, version: &str) { + todo!() + } + + pub fn get_version(&self) -> String { + todo!() + } + + pub fn add(&mut self, command: PhpMixed) -> Option<PhpMixed> { + todo!() + } + + pub fn get(&self, name: &str) -> anyhow::Result<PhpMixed> { + todo!() + } + + pub fn set_auto_exit(&mut self, auto_exit: bool) { + todo!() + } + + pub fn set_catch_exceptions(&mut self, catch_exceptions: bool) { + todo!() + } + + pub fn get_helper_set(&self) -> PhpMixed { + todo!() + } + + pub fn set_helper_set(&mut self, helper_set: PhpMixed) { + todo!() + } + + pub fn get_definition(&self) -> PhpMixed { + todo!() + } + + pub fn get_long_version(&self) -> String { + todo!() + } + + pub fn find(&self, name: &str) -> anyhow::Result<PhpMixed> { + todo!() + } + + pub fn all(&self, namespace: Option<&str>) -> Vec<PhpMixed> { + todo!() + } + + pub fn get_namespaces(&self) -> Vec<String> { + todo!() + } + + pub fn set_default_command(&mut self, command_name: &str, is_single_command: bool) -> &mut Self { + todo!() + } + + pub fn is_single_command(&self) -> bool { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/command/command.rs b/crates/shirabe-external-packages/src/symfony/component/console/command/command.rs new file mode 100644 index 0000000..cf18378 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/command/command.rs @@ -0,0 +1,81 @@ +use shirabe_php_shim::PhpMixed; +use crate::symfony::component::console::input::input_interface::InputInterface; +use crate::symfony::component::console::output::output_interface::OutputInterface; +use crate::symfony::component::console::input::input_definition::InputDefinition; + +#[derive(Debug)] +pub struct Command; + +impl Command { + pub fn new(name: Option<&str>) -> Self { + todo!() + } + + pub fn set_name(&mut self, name: &str) -> &mut Self { + todo!() + } + + pub fn get_name(&self) -> Option<String> { + todo!() + } + + pub fn set_description(&mut self, description: &str) -> &mut Self { + todo!() + } + + pub fn get_description(&self) -> String { + todo!() + } + + pub fn set_help(&mut self, help: &str) -> &mut Self { + todo!() + } + + pub fn set_definition(&mut self, definition: PhpMixed) -> &mut Self { + todo!() + } + + pub fn get_definition(&self) -> &InputDefinition { + todo!() + } + + pub fn add_argument(&mut self, name: &str, mode: Option<i64>, description: &str, default: PhpMixed) -> &mut Self { + todo!() + } + + pub fn add_option(&mut self, name: &str, shortcut: Option<&str>, mode: Option<i64>, description: &str, default: PhpMixed) -> &mut Self { + todo!() + } + + pub fn set_aliases(&mut self, aliases: &[String]) -> &mut Self { + todo!() + } + + pub fn get_aliases(&self) -> Vec<String> { + todo!() + } + + pub fn set_hidden(&mut self, hidden: bool) -> &mut Self { + todo!() + } + + pub fn is_hidden(&self) -> bool { + todo!() + } + + pub fn run( + &mut self, + input: &mut dyn InputInterface, + output: &mut dyn OutputInterface, + ) -> anyhow::Result<i64> { + todo!() + } + + pub fn get_helper(&self, name: &str) -> PhpMixed { + todo!() + } + + pub fn get_helper_set(&self) -> PhpMixed { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/command/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/command/mod.rs new file mode 100644 index 0000000..9fe7961 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/command/mod.rs @@ -0,0 +1 @@ +pub mod command; diff --git a/crates/shirabe-external-packages/src/symfony/component/console/completion/completion_input.rs b/crates/shirabe-external-packages/src/symfony/component/console/completion/completion_input.rs new file mode 100644 index 0000000..a4b3d3e --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/completion/completion_input.rs @@ -0,0 +1,26 @@ +use shirabe_php_shim::PhpMixed; + +#[derive(Debug)] +pub struct CompletionInput; + +impl CompletionInput { + pub fn get_completion_type(&self) -> String { + todo!() + } + + pub fn get_completion_name(&self) -> Option<String> { + todo!() + } + + pub fn get_completion_value(&self) -> String { + todo!() + } + + pub fn must_suggest_option_values_for(&self, name: &str) -> bool { + todo!() + } + + pub fn must_suggest_argument_values_for(&self, name: &str) -> bool { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/completion/completion_suggestions.rs b/crates/shirabe-external-packages/src/symfony/component/console/completion/completion_suggestions.rs new file mode 100644 index 0000000..709cdcd --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/completion/completion_suggestions.rs @@ -0,0 +1,14 @@ +use shirabe_php_shim::PhpMixed; + +#[derive(Debug)] +pub struct CompletionSuggestions; + +impl CompletionSuggestions { + pub fn suggest_values(&mut self, values: Vec<PhpMixed>) { + todo!() + } + + pub fn suggest_value(&mut self, value: PhpMixed) { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/completion/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/completion/mod.rs new file mode 100644 index 0000000..6300bb0 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/completion/mod.rs @@ -0,0 +1,2 @@ +pub mod completion_input; +pub mod completion_suggestions; diff --git a/crates/shirabe-external-packages/src/symfony/component/console/exception/command_not_found_exception.rs b/crates/shirabe-external-packages/src/symfony/component/console/exception/command_not_found_exception.rs new file mode 100644 index 0000000..f1ed60b --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/exception/command_not_found_exception.rs @@ -0,0 +1,13 @@ +#[derive(Debug)] +pub struct CommandNotFoundException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for CommandNotFoundException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for CommandNotFoundException {} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/exception/exception_interface.rs b/crates/shirabe-external-packages/src/symfony/component/console/exception/exception_interface.rs new file mode 100644 index 0000000..3c42009 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/exception/exception_interface.rs @@ -0,0 +1 @@ +pub trait ExceptionInterface: std::error::Error {} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/exception/invalid_argument_exception.rs b/crates/shirabe-external-packages/src/symfony/component/console/exception/invalid_argument_exception.rs new file mode 100644 index 0000000..658ed8c --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/exception/invalid_argument_exception.rs @@ -0,0 +1,13 @@ +#[derive(Debug)] +pub struct InvalidArgumentException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for InvalidArgumentException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for InvalidArgumentException {} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/exception/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/exception/mod.rs new file mode 100644 index 0000000..febda79 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/exception/mod.rs @@ -0,0 +1,3 @@ +pub mod command_not_found_exception; +pub mod exception_interface; +pub mod invalid_argument_exception; diff --git a/crates/shirabe-external-packages/src/symfony/component/console/formatter/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/formatter/mod.rs new file mode 100644 index 0000000..81a2a87 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/formatter/mod.rs @@ -0,0 +1,2 @@ +pub mod output_formatter; +pub mod output_formatter_style; diff --git a/crates/shirabe-external-packages/src/symfony/component/console/formatter/output_formatter.rs b/crates/shirabe-external-packages/src/symfony/component/console/formatter/output_formatter.rs new file mode 100644 index 0000000..1f51e46 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/formatter/output_formatter.rs @@ -0,0 +1,32 @@ +#[derive(Debug)] +pub struct OutputFormatter; + +impl OutputFormatter { + pub fn new(decorated: bool) -> Self { + todo!() + } + + pub fn format(&self, message: &str) -> String { + todo!() + } + + pub fn is_decorated(&self) -> bool { + todo!() + } + + pub fn set_decorated(&mut self, decorated: bool) { + todo!() + } + + pub fn escape(text: &str) -> String { + todo!() + } + + pub fn escape_trailing_backslash(text: &str) -> String { + todo!() + } + + pub fn set_style(&mut self, name: &str, style: crate::symfony::component::console::formatter::output_formatter_style::OutputFormatterStyle) { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/formatter/output_formatter_style.rs b/crates/shirabe-external-packages/src/symfony/component/console/formatter/output_formatter_style.rs new file mode 100644 index 0000000..8be111d --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/formatter/output_formatter_style.rs @@ -0,0 +1,8 @@ +#[derive(Debug)] +pub struct OutputFormatterStyle; + +impl OutputFormatterStyle { + pub fn new(foreground: Option<&str>, background: Option<&str>, options: Option<Vec<String>>) -> Self { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/formatter_helper.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/formatter_helper.rs new file mode 100644 index 0000000..eb19ea7 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/formatter_helper.rs @@ -0,0 +1,12 @@ +#[derive(Debug)] +pub struct FormatterHelper; + +impl FormatterHelper { + pub fn format_section(&self, section: &str, message: &str, style: &str) -> String { + todo!() + } + + pub fn format_block(&self, messages: &[&str], style: &str, large: bool) -> String { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/helper.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/helper.rs new file mode 100644 index 0000000..881aabd --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/helper.rs @@ -0,0 +1,3 @@ +pub trait Helper { + fn get_name(&self) -> String; +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/helper_set.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/helper_set.rs new file mode 100644 index 0000000..9448310 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/helper_set.rs @@ -0,0 +1,22 @@ +use shirabe_php_shim::PhpMixed; + +#[derive(Debug)] +pub struct HelperSet; + +impl HelperSet { + pub fn new(helpers: Vec<PhpMixed>) -> Self { + todo!() + } + + pub fn get(&self, name: &str) -> Option<PhpMixed> { + todo!() + } + + pub fn set(&mut self, helper: PhpMixed, alias: Option<&str>) { + todo!() + } + + pub fn has(&self, name: &str) -> bool { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/mod.rs new file mode 100644 index 0000000..4fbb5c3 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/mod.rs @@ -0,0 +1,7 @@ +pub mod formatter_helper; +pub mod helper; +pub mod helper_set; +pub mod progress_bar; +pub mod question_helper; +pub mod table; +pub mod table_separator; 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 new file mode 100644 index 0000000..22ca089 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/progress_bar.rs @@ -0,0 +1,34 @@ +use crate::symfony::component::console::output::output_interface::OutputInterface; + +#[derive(Debug)] +pub struct ProgressBar; + +impl ProgressBar { + pub fn new(output: &dyn OutputInterface, max: i64) -> Self { + todo!() + } + + pub fn start(&mut self, max: Option<i64>) { + todo!() + } + + pub fn advance(&mut self, step: i64) { + todo!() + } + + pub fn finish(&mut self) { + todo!() + } + + pub fn set_format(&mut self, format: &str) { + todo!() + } + + pub fn get_progress(&self) -> i64 { + todo!() + } + + pub fn get_max_steps(&self) -> i64 { + 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 new file mode 100644 index 0000000..ade7c06 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/question_helper.rs @@ -0,0 +1,18 @@ +use shirabe_php_shim::PhpMixed; +use crate::symfony::component::console::input::input_interface::InputInterface; +use crate::symfony::component::console::output::output_interface::OutputInterface; +use crate::symfony::component::console::question::question::Question; + +#[derive(Debug)] +pub struct QuestionHelper; + +impl QuestionHelper { + pub fn ask( + &self, + input: &mut dyn InputInterface, + output: &mut 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 new file mode 100644 index 0000000..0244c73 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs @@ -0,0 +1,35 @@ +use shirabe_php_shim::PhpMixed; +use crate::symfony::component::console::output::output_interface::OutputInterface; + +#[derive(Debug)] +pub struct Table; + +impl Table { + pub fn new(output: &dyn OutputInterface) -> Self { + todo!() + } + + pub fn set_headers(&mut self, headers: Vec<PhpMixed>) -> &mut Self { + todo!() + } + + pub fn set_rows(&mut self, rows: Vec<PhpMixed>) -> &mut Self { + todo!() + } + + pub fn add_row(&mut self, row: PhpMixed) -> &mut Self { + todo!() + } + + pub fn render(&mut self) { + todo!() + } + + pub fn set_style(&mut self, style: &str) -> &mut Self { + todo!() + } + + pub fn set_column_widths(&mut self, widths: Vec<i64>) -> &mut Self { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/table_separator.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/table_separator.rs new file mode 100644 index 0000000..7b4b2e2 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/table_separator.rs @@ -0,0 +1,8 @@ +#[derive(Debug)] +pub struct TableSeparator; + +impl TableSeparator { + pub fn new() -> Self { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/input/array_input.rs b/crates/shirabe-external-packages/src/symfony/component/console/input/array_input.rs new file mode 100644 index 0000000..c70e798 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/input/array_input.rs @@ -0,0 +1,31 @@ +use shirabe_php_shim::PhpMixed; +use indexmap::IndexMap; +use crate::symfony::component::console::input::input_interface::InputInterface; +use crate::symfony::component::console::input::input_definition::InputDefinition; + +#[derive(Debug)] +pub struct ArrayInput; + +impl ArrayInput { + pub fn new(parameters: IndexMap<String, PhpMixed>, definition: Option<InputDefinition>) -> Self { + todo!() + } +} + +impl InputInterface for ArrayInput { + fn get_first_argument(&self) -> Option<String> { todo!() } + fn has_parameter_option(&self, _values: &[&str], _only_params: bool) -> bool { todo!() } + fn get_parameter_option(&self, _values: &[&str], _default: PhpMixed, _only_params: bool) -> PhpMixed { todo!() } + fn bind(&mut self, _definition: &InputDefinition) -> anyhow::Result<()> { todo!() } + fn validate(&self) -> anyhow::Result<()> { todo!() } + fn get_arguments(&self) -> IndexMap<String, PhpMixed> { todo!() } + fn get_argument(&self, _name: &str) -> PhpMixed { todo!() } + fn set_argument(&mut self, _name: &str, _value: PhpMixed) -> anyhow::Result<()> { todo!() } + fn has_argument(&self, _name: &str) -> bool { todo!() } + fn get_options(&self) -> IndexMap<String, PhpMixed> { todo!() } + fn get_option(&self, _name: &str) -> PhpMixed { todo!() } + fn set_option(&mut self, _name: &str, _value: PhpMixed) -> anyhow::Result<()> { todo!() } + fn has_option(&self, _name: &str) -> bool { todo!() } + fn is_interactive(&self) -> bool { todo!() } + fn set_interactive(&mut self, _interactive: bool) { todo!() } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/input/input_definition.rs b/crates/shirabe-external-packages/src/symfony/component/console/input/input_definition.rs new file mode 100644 index 0000000..7a46004 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/input/input_definition.rs @@ -0,0 +1,30 @@ +use shirabe_php_shim::PhpMixed; + +#[derive(Debug)] +pub struct InputDefinition; + +impl InputDefinition { + pub fn new(definition: Vec<PhpMixed>) -> Self { + todo!() + } + + pub fn add_argument(&mut self, argument: PhpMixed) { + todo!() + } + + pub fn add_option(&mut self, option: PhpMixed) { + todo!() + } + + pub fn has_option(&self, name: &str) -> bool { + todo!() + } + + pub fn get_option(&self, name: &str) -> anyhow::Result<PhpMixed> { + todo!() + } + + pub fn has_argument(&self, name: &str) -> bool { + 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 new file mode 100644 index 0000000..04e302e --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/input/input_interface.rs @@ -0,0 +1,19 @@ +use shirabe_php_shim::PhpMixed; + +pub trait InputInterface { + fn get_first_argument(&self) -> Option<String>; + fn has_parameter_option(&self, values: &[&str], only_params: bool) -> bool; + fn get_parameter_option(&self, values: &[&str], default: PhpMixed, only_params: bool) -> PhpMixed; + fn bind(&mut self, definition: &crate::symfony::component::console::input::input_definition::InputDefinition) -> anyhow::Result<()>; + fn validate(&self) -> anyhow::Result<()>; + fn get_arguments(&self) -> indexmap::IndexMap<String, PhpMixed>; + fn get_argument(&self, name: &str) -> PhpMixed; + fn set_argument(&mut self, name: &str, value: PhpMixed) -> anyhow::Result<()>; + fn has_argument(&self, name: &str) -> bool; + fn get_options(&self) -> indexmap::IndexMap<String, PhpMixed>; + fn get_option(&self, name: &str) -> PhpMixed; + fn set_option(&mut self, name: &str, value: PhpMixed) -> anyhow::Result<()>; + fn has_option(&self, name: &str) -> bool; + fn is_interactive(&self) -> bool; + fn set_interactive(&mut self, interactive: bool); +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/input/input_option.rs b/crates/shirabe-external-packages/src/symfony/component/console/input/input_option.rs new file mode 100644 index 0000000..9c188ba --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/input/input_option.rs @@ -0,0 +1,46 @@ +use shirabe_php_shim::PhpMixed; + +#[derive(Debug)] +pub struct InputOption; + +impl InputOption { + pub const VALUE_NONE: i64 = 1; + pub const VALUE_REQUIRED: i64 = 2; + pub const VALUE_OPTIONAL: i64 = 4; + pub const VALUE_IS_ARRAY: i64 = 8; + pub const VALUE_NEGATABLE: i64 = 16; + + pub fn new( + name: &str, + shortcut: Option<&str>, + mode: Option<i64>, + description: &str, + default: PhpMixed, + ) -> Self { + todo!() + } + + pub fn get_name(&self) -> String { + todo!() + } + + pub fn accept_value(&self) -> bool { + todo!() + } + + pub fn is_value_required(&self) -> bool { + todo!() + } + + pub fn is_value_optional(&self) -> bool { + todo!() + } + + pub fn is_array(&self) -> bool { + todo!() + } + + pub fn get_default(&self) -> PhpMixed { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/input/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/input/mod.rs new file mode 100644 index 0000000..1a81599 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/input/mod.rs @@ -0,0 +1,5 @@ +pub mod array_input; +pub mod input_definition; +pub mod input_interface; +pub mod input_option; +pub mod string_input; diff --git a/crates/shirabe-external-packages/src/symfony/component/console/input/string_input.rs b/crates/shirabe-external-packages/src/symfony/component/console/input/string_input.rs new file mode 100644 index 0000000..3c401eb --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/input/string_input.rs @@ -0,0 +1,31 @@ +use shirabe_php_shim::PhpMixed; +use indexmap::IndexMap; +use crate::symfony::component::console::input::input_interface::InputInterface; +use crate::symfony::component::console::input::input_definition::InputDefinition; + +#[derive(Debug)] +pub struct StringInput; + +impl StringInput { + pub fn new(input: &str) -> Self { + todo!() + } +} + +impl InputInterface for StringInput { + fn get_first_argument(&self) -> Option<String> { todo!() } + fn has_parameter_option(&self, _values: &[&str], _only_params: bool) -> bool { todo!() } + fn get_parameter_option(&self, _values: &[&str], _default: PhpMixed, _only_params: bool) -> PhpMixed { todo!() } + fn bind(&mut self, _definition: &InputDefinition) -> anyhow::Result<()> { todo!() } + fn validate(&self) -> anyhow::Result<()> { todo!() } + fn get_arguments(&self) -> IndexMap<String, PhpMixed> { todo!() } + fn get_argument(&self, _name: &str) -> PhpMixed { todo!() } + fn set_argument(&mut self, _name: &str, _value: PhpMixed) -> anyhow::Result<()> { todo!() } + fn has_argument(&self, _name: &str) -> bool { todo!() } + fn get_options(&self) -> IndexMap<String, PhpMixed> { todo!() } + fn get_option(&self, _name: &str) -> PhpMixed { todo!() } + fn set_option(&mut self, _name: &str, _value: PhpMixed) -> anyhow::Result<()> { todo!() } + fn has_option(&self, _name: &str) -> bool { todo!() } + fn is_interactive(&self) -> bool { todo!() } + fn set_interactive(&mut self, _interactive: bool) { todo!() } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/mod.rs new file mode 100644 index 0000000..b7c65d8 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/mod.rs @@ -0,0 +1,11 @@ +pub mod application; +pub mod command; +pub mod completion; +pub mod exception; +pub mod formatter; +pub mod helper; +pub mod input; +pub mod output; +pub mod question; +pub mod single_command_application; +pub mod terminal; 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 new file mode 100644 index 0000000..98133df --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/output/console_output.rs @@ -0,0 +1,31 @@ +use crate::symfony::component::console::formatter::output_formatter::OutputFormatter; +use crate::symfony::component::console::output::output_interface::OutputInterface; +use crate::symfony::component::console::output::console_output_interface::ConsoleOutputInterface; + +#[derive(Debug)] +pub struct ConsoleOutput; + +impl ConsoleOutput { + pub fn new(verbosity: i64, decorated: Option<bool>, formatter: Option<OutputFormatter>) -> Self { + todo!() + } + + pub fn get_error_output(&self) -> &dyn OutputInterface { + todo!() + } +} + +impl OutputInterface for ConsoleOutput { + fn write(&mut self, _messages: &str, _newline: bool, _type: i64) { todo!() } + fn writeln(&mut self, _messages: &str, _type: i64) { todo!() } + fn set_verbosity(&mut self, _level: i64) { todo!() } + fn get_verbosity(&self) -> i64 { todo!() } + fn is_quiet(&self) -> bool { todo!() } + fn is_verbose(&self) -> bool { todo!() } + fn is_very_verbose(&self) -> bool { todo!() } + fn is_debug(&self) -> bool { todo!() } + fn set_decorated(&mut self, _decorated: bool) { todo!() } + fn is_decorated(&self) -> bool { todo!() } + fn set_formatter(&mut self, _formatter: OutputFormatter) { todo!() } + fn get_formatter(&self) -> &OutputFormatter { 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 new file mode 100644 index 0000000..0e5fc88 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/output/console_output_interface.rs @@ -0,0 +1,6 @@ +use crate::symfony::component::console::output::output_interface::OutputInterface; + +pub trait ConsoleOutputInterface: OutputInterface { + fn get_error_output(&self) -> &dyn OutputInterface; + fn set_error_output(&mut self, error: Box<dyn OutputInterface>); +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/output/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/output/mod.rs new file mode 100644 index 0000000..a548a0c --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/output/mod.rs @@ -0,0 +1,3 @@ +pub mod console_output; +pub mod console_output_interface; +pub mod output_interface; 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 new file mode 100644 index 0000000..62a95bb --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/output/output_interface.rs @@ -0,0 +1,26 @@ +use crate::symfony::component::console::formatter::output_formatter::OutputFormatter; + +pub trait OutputInterface { + fn write(&mut self, messages: &str, newline: bool, r#type: i64); + fn writeln(&mut self, messages: &str, r#type: i64); + fn set_verbosity(&mut self, level: i64); + fn get_verbosity(&self) -> i64; + fn is_quiet(&self) -> bool; + fn is_verbose(&self) -> bool; + fn is_very_verbose(&self) -> bool; + fn is_debug(&self) -> bool; + fn set_decorated(&mut self, decorated: bool); + fn is_decorated(&self) -> bool; + fn set_formatter(&mut self, formatter: OutputFormatter); + fn get_formatter(&self) -> &OutputFormatter; +} + +pub const VERBOSITY_QUIET: i64 = 16; +pub const VERBOSITY_NORMAL: i64 = 32; +pub const VERBOSITY_VERBOSE: i64 = 64; +pub const VERBOSITY_VERY_VERBOSE: i64 = 128; +pub const VERBOSITY_DEBUG: i64 = 256; + +pub const OUTPUT_NORMAL: i64 = 1; +pub const OUTPUT_RAW: i64 = 2; +pub const OUTPUT_PLAIN: i64 = 4; diff --git a/crates/shirabe-external-packages/src/symfony/component/console/question/choice_question.rs b/crates/shirabe-external-packages/src/symfony/component/console/question/choice_question.rs new file mode 100644 index 0000000..5b32ced --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/question/choice_question.rs @@ -0,0 +1,19 @@ +use shirabe_php_shim::PhpMixed; +use crate::symfony::component::console::question::question::Question; + +#[derive(Debug)] +pub struct ChoiceQuestion(pub Question); + +impl ChoiceQuestion { + pub fn new(question: &str, choices: Vec<PhpMixed>, default: Option<PhpMixed>) -> Self { + todo!() + } + + pub fn set_multiselect(&mut self, multiselect: bool) { + todo!() + } + + pub fn set_error_message(&mut self, error_message: &str) { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/question/mod.rs b/crates/shirabe-external-packages/src/symfony/component/console/question/mod.rs new file mode 100644 index 0000000..e3a42e8 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/question/mod.rs @@ -0,0 +1,2 @@ +pub mod choice_question; +pub mod question; diff --git a/crates/shirabe-external-packages/src/symfony/component/console/question/question.rs b/crates/shirabe-external-packages/src/symfony/component/console/question/question.rs new file mode 100644 index 0000000..cfbdd25 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/question/question.rs @@ -0,0 +1,46 @@ +use shirabe_php_shim::PhpMixed; + +#[derive(Debug)] +pub struct Question; + +impl Question { + pub fn new(question: &str, default: Option<PhpMixed>) -> Self { + todo!() + } + + pub fn set_validator(&mut self, validator: Option<Box<dyn Fn(Option<PhpMixed>) -> anyhow::Result<PhpMixed>>>) { + todo!() + } + + pub fn set_max_attempts(&mut self, attempts: Option<i64>) { + todo!() + } + + pub fn set_hidden(&mut self, hidden: bool) { + todo!() + } + + pub fn set_hidden_fallback(&mut self, fallback: bool) { + todo!() + } + + pub fn get_question(&self) -> String { + todo!() + } + + pub fn get_default(&self) -> Option<PhpMixed> { + todo!() + } + + pub fn is_hidden(&self) -> bool { + todo!() + } + + pub fn get_validator(&self) -> Option<&dyn Fn(Option<PhpMixed>) -> anyhow::Result<PhpMixed>> { + todo!() + } + + pub fn get_max_attempts(&self) -> Option<i64> { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/single_command_application.rs b/crates/shirabe-external-packages/src/symfony/component/console/single_command_application.rs new file mode 100644 index 0000000..9642aa0 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/single_command_application.rs @@ -0,0 +1,26 @@ +use shirabe_php_shim::PhpMixed; + +#[derive(Debug)] +pub struct SingleCommandApplication; + +impl SingleCommandApplication { + pub fn new() -> Self { + todo!() + } + + pub fn set_name(&mut self, name: &str) -> &mut Self { + todo!() + } + + pub fn set_version(&mut self, version: &str) -> &mut Self { + todo!() + } + + pub fn set_code(&mut self, code: Box<dyn Fn(&dyn std::any::Any, &dyn std::any::Any) -> i64>) -> &mut Self { + todo!() + } + + pub fn run(&mut self) -> anyhow::Result<i64> { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/console/terminal.rs b/crates/shirabe-external-packages/src/symfony/component/console/terminal.rs new file mode 100644 index 0000000..f960a50 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/console/terminal.rs @@ -0,0 +1,16 @@ +#[derive(Debug)] +pub struct Terminal; + +impl Terminal { + pub fn new() -> Self { + todo!() + } + + pub fn get_width(&self) -> i64 { + todo!() + } + + pub fn get_height(&self) -> i64 { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs new file mode 100644 index 0000000..3ffcc9c --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs @@ -0,0 +1,14 @@ +#[derive(Debug)] +pub struct IOException { + pub message: String, + pub code: i64, + pub path: Option<String>, +} + +impl std::fmt::Display for IOException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for IOException {} diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/mod.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/mod.rs new file mode 100644 index 0000000..e6d5ea1 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/mod.rs @@ -0,0 +1 @@ +pub mod io_exception; diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/filesystem.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/filesystem.rs new file mode 100644 index 0000000..9999419 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/filesystem.rs @@ -0,0 +1,105 @@ +use shirabe_php_shim::PhpMixed; + +#[derive(Debug, Clone)] +pub struct Filesystem; + +impl Filesystem { + pub fn new() -> Self { + todo!() + } + + pub fn copy(&self, origin_file: &str, target_file: &str, override_file: bool) -> anyhow::Result<()> { + todo!() + } + + pub fn mkdir(&self, dirs: PhpMixed, mode: u32) -> anyhow::Result<()> { + todo!() + } + + pub fn exists(&self, files: PhpMixed) -> bool { + todo!() + } + + pub fn touch(&self, files: PhpMixed, time: Option<i64>, atime: Option<i64>) -> anyhow::Result<()> { + todo!() + } + + pub fn remove(&self, files: PhpMixed) -> anyhow::Result<()> { + todo!() + } + + pub fn chmod(&self, files: PhpMixed, mode: u32, umask: u32, recursive: bool) -> anyhow::Result<()> { + todo!() + } + + pub fn chown(&self, files: PhpMixed, user: PhpMixed, recursive: bool) -> anyhow::Result<()> { + todo!() + } + + pub fn chgrp(&self, files: PhpMixed, group: PhpMixed, recursive: bool) -> anyhow::Result<()> { + todo!() + } + + pub fn rename(&self, origin: &str, target: &str, override_file: bool) -> anyhow::Result<()> { + todo!() + } + + pub fn symlink(&self, origin_dir: &str, target_dir: &str, copy_on_windows: bool) -> anyhow::Result<()> { + todo!() + } + + pub fn hard_link(&self, origin_file: &str, target_files: PhpMixed) -> anyhow::Result<()> { + todo!() + } + + pub fn read_link(&self, path: &str) -> String { + todo!() + } + + pub fn make_path_relative(&self, end_path: &str, start_path: &str) -> String { + todo!() + } + + pub fn mirror( + &self, + origin_dir: &str, + target_dir: &str, + iterator: Option<PhpMixed>, + options: &indexmap::IndexMap<String, PhpMixed>, + ) -> anyhow::Result<()> { + todo!() + } + + pub fn is_absolute_path(&self, file: &str) -> bool { + todo!() + } + + pub fn dump_file(&self, filename: &str, content: &str) -> anyhow::Result<()> { + todo!() + } + + pub fn append_to_file(&self, filename: &str, content: &str) -> anyhow::Result<()> { + todo!() + } + + pub fn temp_nam(&self, dir: &str, prefix: &str) -> anyhow::Result<String> { + todo!() + } + + // Static-style helper methods used in the ported codebase + pub fn is_readable(path: &str) -> bool { + todo!() + } + + pub fn is_local_path(path: &str) -> bool { + todo!() + } + + pub fn trim_trailing_slash(path: &str) -> String { + todo!() + } + + pub fn get_platform_path(path: &str) -> String { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/mod.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/mod.rs new file mode 100644 index 0000000..e74dc5f --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/mod.rs @@ -0,0 +1,2 @@ +pub mod exception; +pub mod filesystem; diff --git a/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs b/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs new file mode 100644 index 0000000..95bc4f7 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs @@ -0,0 +1,55 @@ +use crate::symfony::component::finder::spl_file_info::SplFileInfo; + +#[derive(Debug)] +pub struct Finder; + +impl Finder { + pub fn new() -> Self { + todo!() + } + + pub fn create() -> Self { + todo!() + } + + pub fn files(&mut self) -> &mut Self { + todo!() + } + + pub fn directories(&mut self) -> &mut Self { + todo!() + } + + pub fn depth(&mut self, level: i64) -> &mut Self { + todo!() + } + + pub fn r#in(&mut self, dirs: &str) -> &mut Self { + todo!() + } + + pub fn ignore_vcs(&mut self, ignore_vcs: bool) -> &mut Self { + todo!() + } + + pub fn ignore_dot_files(&mut self, ignore_dot_files: bool) -> &mut Self { + todo!() + } + + pub fn not_name(&mut self, pattern: &str) -> &mut Self { + todo!() + } + + pub fn name(&mut self, pattern: &str) -> &mut Self { + todo!() + } + + pub fn sort_by_name(&mut self) -> &mut Self { + todo!() + } + + pub fn iter(&self) -> impl Iterator<Item = SplFileInfo> { + todo!(); + std::iter::empty() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/finder/glob.rs b/crates/shirabe-external-packages/src/symfony/component/finder/glob.rs new file mode 100644 index 0000000..d6aadd2 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/finder/glob.rs @@ -0,0 +1,8 @@ +#[derive(Debug)] +pub struct Glob; + +impl Glob { + pub fn to_regex(glob: &str, strict_leading_dot: bool, strict_wildcard_slash: bool) -> String { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/finder/mod.rs b/crates/shirabe-external-packages/src/symfony/component/finder/mod.rs new file mode 100644 index 0000000..b71a0ef --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/finder/mod.rs @@ -0,0 +1,3 @@ +pub mod finder; +pub mod glob; +pub mod spl_file_info; diff --git a/crates/shirabe-external-packages/src/symfony/component/finder/spl_file_info.rs b/crates/shirabe-external-packages/src/symfony/component/finder/spl_file_info.rs new file mode 100644 index 0000000..fd63b33 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/finder/spl_file_info.rs @@ -0,0 +1,52 @@ +#[derive(Debug)] +pub struct SplFileInfo; + +impl SplFileInfo { + pub fn get_path_name(&self) -> String { + todo!() + } + + pub fn get_path(&self) -> String { + todo!() + } + + pub fn get_filename(&self) -> String { + todo!() + } + + pub fn get_basename(&self, suffix: Option<&str>) -> String { + todo!() + } + + pub fn get_extension(&self) -> String { + todo!() + } + + pub fn get_relative_path_name(&self) -> String { + todo!() + } + + pub fn get_relative_path(&self) -> String { + todo!() + } + + pub fn is_dir(&self) -> bool { + todo!() + } + + pub fn is_file(&self) -> bool { + todo!() + } + + pub fn is_link(&self) -> bool { + todo!() + } + + pub fn get_real_path(&self) -> Option<String> { + todo!() + } + + pub fn get_size(&self) -> i64 { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/mod.rs b/crates/shirabe-external-packages/src/symfony/component/mod.rs new file mode 100644 index 0000000..e0d9e4f --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/mod.rs @@ -0,0 +1,4 @@ +pub mod console; +pub mod filesystem; +pub mod finder; +pub mod process; diff --git a/crates/shirabe-external-packages/src/symfony/component/process/exception/mod.rs b/crates/shirabe-external-packages/src/symfony/component/process/exception/mod.rs new file mode 100644 index 0000000..0fec4ee --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/process/exception/mod.rs @@ -0,0 +1,3 @@ +pub mod process_signaled_exception; +pub mod process_timed_out_exception; +pub mod runtime_exception; diff --git a/crates/shirabe-external-packages/src/symfony/component/process/exception/process_signaled_exception.rs b/crates/shirabe-external-packages/src/symfony/component/process/exception/process_signaled_exception.rs new file mode 100644 index 0000000..154a7a7 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/process/exception/process_signaled_exception.rs @@ -0,0 +1,13 @@ +#[derive(Debug)] +pub struct ProcessSignaledException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for ProcessSignaledException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for ProcessSignaledException {} diff --git a/crates/shirabe-external-packages/src/symfony/component/process/exception/process_timed_out_exception.rs b/crates/shirabe-external-packages/src/symfony/component/process/exception/process_timed_out_exception.rs new file mode 100644 index 0000000..cbcdaa4 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/process/exception/process_timed_out_exception.rs @@ -0,0 +1,13 @@ +#[derive(Debug)] +pub struct ProcessTimedOutException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for ProcessTimedOutException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for ProcessTimedOutException {} diff --git a/crates/shirabe-external-packages/src/symfony/component/process/exception/runtime_exception.rs b/crates/shirabe-external-packages/src/symfony/component/process/exception/runtime_exception.rs new file mode 100644 index 0000000..3ac2c8b --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/process/exception/runtime_exception.rs @@ -0,0 +1,13 @@ +#[derive(Debug)] +pub struct RuntimeException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for RuntimeException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for RuntimeException {} diff --git a/crates/shirabe-external-packages/src/symfony/component/process/executable_finder.rs b/crates/shirabe-external-packages/src/symfony/component/process/executable_finder.rs new file mode 100644 index 0000000..9aa5a8b --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/process/executable_finder.rs @@ -0,0 +1,16 @@ +#[derive(Debug)] +pub struct ExecutableFinder; + +impl ExecutableFinder { + pub fn new() -> Self { + todo!() + } + + pub fn add_suffix(&mut self, suffix: &str) { + todo!() + } + + pub fn find(&self, name: &str, default: Option<&str>, dirs: &[String]) -> Option<String> { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/process/mod.rs b/crates/shirabe-external-packages/src/symfony/component/process/mod.rs new file mode 100644 index 0000000..4d21bf3 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/process/mod.rs @@ -0,0 +1,4 @@ +pub mod exception; +pub mod executable_finder; +pub mod php_executable_finder; +pub mod process; diff --git a/crates/shirabe-external-packages/src/symfony/component/process/php_executable_finder.rs b/crates/shirabe-external-packages/src/symfony/component/process/php_executable_finder.rs new file mode 100644 index 0000000..be99e8c --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/process/php_executable_finder.rs @@ -0,0 +1,16 @@ +#[derive(Debug)] +pub struct PhpExecutableFinder; + +impl PhpExecutableFinder { + pub fn new() -> Self { + todo!() + } + + pub fn find(&self, include_args: bool) -> Option<String> { + todo!() + } + + pub fn find_arguments(&self) -> Vec<String> { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/component/process/process.rs b/crates/shirabe-external-packages/src/symfony/component/process/process.rs new file mode 100644 index 0000000..7572f3b --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/component/process/process.rs @@ -0,0 +1,110 @@ +use shirabe_php_shim::PhpMixed; +use indexmap::IndexMap; + +#[derive(Debug)] +pub struct Process; + +impl Process { + pub const ERR: &'static str = "err"; + pub const OUT: &'static str = "out"; + + pub fn new( + command: Vec<String>, + cwd: Option<String>, + env: Option<IndexMap<String, String>>, + input: Option<String>, + timeout: Option<f64>, + ) -> Self { + todo!() + } + + pub fn from_shell_commandline( + command: &str, + cwd: Option<&str>, + env: Option<IndexMap<String, String>>, + input: Option<String>, + timeout: Option<f64>, + ) -> Self { + todo!() + } + + pub fn set_timeout(&mut self, timeout: Option<f64>) -> &mut Self { + todo!() + } + + pub fn set_env(&mut self, env: IndexMap<String, String>) -> &mut Self { + todo!() + } + + pub fn set_input(&mut self, input: Option<String>) -> &mut Self { + todo!() + } + + pub fn run(&mut self, callback: Option<Box<dyn FnMut(&str, &str)>>) -> i64 { + todo!() + } + + pub fn must_run(&mut self, callback: Option<Box<dyn FnMut(&str, &str)>>) -> anyhow::Result<&mut Self> { + todo!() + } + + pub fn start(&mut self, callback: Option<Box<dyn FnMut(&str, &str)>>) { + todo!() + } + + pub fn wait(&mut self, callback: Option<Box<dyn FnMut(&str, &str)>>) -> i64 { + todo!() + } + + pub fn stop(&mut self, timeout: f64, signal: Option<i64>) -> Option<i64> { + todo!() + } + + pub fn is_running(&self) -> bool { + todo!() + } + + pub fn is_successful(&self) -> bool { + todo!() + } + + pub fn is_started(&self) -> bool { + todo!() + } + + pub fn is_terminated(&self) -> bool { + todo!() + } + + pub fn get_output(&self) -> String { + todo!() + } + + pub fn get_error_output(&self) -> String { + todo!() + } + + pub fn get_exit_code(&self) -> Option<i64> { + todo!() + } + + pub fn get_exit_code_text(&self) -> Option<String> { + todo!() + } + + pub fn get_command_line(&self) -> String { + todo!() + } + + pub fn check_timeout(&self) -> anyhow::Result<()> { + todo!() + } + + pub fn get_timeout(&self) -> Option<f64> { + todo!() + } + + pub fn set_working_directory(&mut self, cwd: &str) -> &mut Self { + todo!() + } +} |
