I have several modules and observer for their connections. For example, the Filter Class and the Sorting class, when sending filtering, you need to make a request for the state of Sotring and return any data.
Now I have done so that when the Filter needs to receive data, it publishes an event ( observe.publish ) and already in Sorting I subscribe to this event ( observe.subscribe ) and inside it I do another ( observe.publish ) with the necessary data and well in Filtration catch them just through ( observe.subscribe ).
Can anyone advise if there are any other ways to do this?