You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With MessageSubscriberInterface::getHandledMessages() we can return an array of classes that should be handled but this requires knowing the exact classes before hand. What if we wanted all messages that implement an interface to be handled by a handler?
One solution I came up with was to loop through get_declared_classes() in MessageSubscriberInterface::getHandledMessages() and return the classes that implement an interface but this seems clunky (and perhaps error prone).