diff options
Diffstat (limited to 'crates/shirabe/src/io/io_interface.rs')
| -rw-r--r-- | crates/shirabe/src/io/io_interface.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/shirabe/src/io/io_interface.rs b/crates/shirabe/src/io/io_interface.rs index 96bc1980..33a2f017 100644 --- a/crates/shirabe/src/io/io_interface.rs +++ b/crates/shirabe/src/io/io_interface.rs @@ -106,10 +106,13 @@ pub trait IOInterfaceImmutable: std::fmt::Debug { fn ask_and_hide_answer(&self, question: String) -> Option<String>; + /// PHP `array $choices` may be a list (`PhpMixed::List`) or an associative + /// array (`PhpMixed::Array`); list choices resolve to their index, while + /// associative choices resolve to their key. fn select( &self, question: String, - choices: Vec<String>, + choices: PhpMixed, default: PhpMixed, attempts: PhpMixed, error_message: String, @@ -301,7 +304,7 @@ impl IOInterfaceImmutable for std::rc::Rc<std::cell::RefCell<dyn IOInterface>> { fn select( &self, question: String, - choices: Vec<String>, + choices: PhpMixed, default: PhpMixed, attempts: PhpMixed, error_message: String, |
