aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/plugin/plugin_interface.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-20 08:33:49 +0900
committernsfisis <nsfisis@gmail.com>2026-05-20 08:33:57 +0900
commitf31b101ce1e921a026ba234b1f0a83b0392bc118 (patch)
treeb7ac2aa84d71ebd162cc21aeab0240e7e0544988 /crates/shirabe/src/plugin/plugin_interface.rs
parent5e31fa33c3b5cf726a57a063b8e7a070869250fe (diff)
downloadphp-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.tar.gz
php-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.tar.zst
php-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.zip
fix(compile): fix all remaining compile errors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/plugin/plugin_interface.rs')
-rw-r--r--crates/shirabe/src/plugin/plugin_interface.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/shirabe/src/plugin/plugin_interface.rs b/crates/shirabe/src/plugin/plugin_interface.rs
index a7bb384..d3083cc 100644
--- a/crates/shirabe/src/plugin/plugin_interface.rs
+++ b/crates/shirabe/src/plugin/plugin_interface.rs
@@ -2,6 +2,7 @@
use crate::composer::Composer;
use crate::io::io_interface::IOInterface;
+use crate::plugin::capable::Capable;
pub const PLUGIN_API_VERSION: &'static str = "2.9.0";
@@ -15,4 +16,15 @@ pub trait PluginInterface: std::fmt::Debug {
fn clone_box(&self) -> Box<dyn PluginInterface> {
todo!()
}
+
+ // TODO(plugin): PHP-side `instanceof` checks for EventSubscriberInterface / Capable.
+ // EventSubscriberInterface is not dyn-compatible (its only method is associated, not
+ // a `&self` method), so we expose a boolean predicate instead.
+ fn is_event_subscriber_interface(&self) -> bool {
+ false
+ }
+
+ fn as_capable(&self) -> Option<&dyn Capable> {
+ None
+ }
}