diff options
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/input/array_input.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/input/array_input.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/input/array_input.rs b/crates/shirabe-external-packages/src/symfony/console/input/array_input.rs index ccc1916..705c997 100644 --- a/crates/shirabe-external-packages/src/symfony/console/input/array_input.rs +++ b/crates/shirabe-external-packages/src/symfony/console/input/array_input.rs @@ -14,7 +14,7 @@ use shirabe_php_shim::PhpMixed; /// /// PHP arrays can mix integer and string keys; `parameters` preserves both the /// key type (`PhpMixed::Int` / `PhpMixed::String`) and the insertion order. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ArrayInput { pub(crate) inner: Input, parameters: Vec<(PhpMixed, PhpMixed)>, @@ -298,6 +298,10 @@ impl ArrayInput { } impl InputInterface for ArrayInput { + fn dup(&self) -> std::rc::Rc<std::cell::RefCell<dyn InputInterface>> { + std::rc::Rc::new(std::cell::RefCell::new(self.clone())) + } + fn get_first_argument(&self) -> Option<String> { ArrayInput::get_first_argument(self).map(|v| shirabe_php_shim::php_to_string(&v)) } |
