aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-symfony-console/src/helper/helper_interface.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-symfony-console/src/helper/helper_interface.rs')
-rw-r--r--crates/shirabe-symfony-console/src/helper/helper_interface.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/shirabe-symfony-console/src/helper/helper_interface.rs b/crates/shirabe-symfony-console/src/helper/helper_interface.rs
new file mode 100644
index 00000000..41c0b680
--- /dev/null
+++ b/crates/shirabe-symfony-console/src/helper/helper_interface.rs
@@ -0,0 +1,15 @@
+//! ref: composer/vendor/symfony/console/Helper/HelperInterface.php
+
+use crate::helper::helper_set::HelperSet;
+
+/// HelperInterface is the interface all helpers must implement.
+pub trait HelperInterface: std::fmt::Debug + shirabe_php_shim::AsAny {
+ /// Sets the helper set associated with this helper.
+ fn set_helper_set(&mut self, helper_set: Option<std::rc::Rc<std::cell::RefCell<HelperSet>>>);
+
+ /// Gets the helper set associated with this helper.
+ fn get_helper_set(&self) -> Option<std::rc::Rc<std::cell::RefCell<HelperSet>>>;
+
+ /// Returns the canonical name of this helper.
+ fn get_name(&self) -> String;
+}