This is a solution for usage of the StaticEventManager. Basically, it
will instead expect the following:
- Classes composing an EventManager will implement EventManagerAware,
and thus opt-in to setter injection of an EM instance
- EM instances will _not_ be shared between classes
- The EM implements the SharedEventManagerAware interface, indicating it
opts-in to setter injection of a SharedEventManager (note: not static)
- A single "SharedEventManager" will be shared between all instances of
This commit does the following:
- Renames StaticEventCollection to SharedEventCollection
- Creates SharedEventManager, which implements all the functionality of
StaticEventManager except the singleton aspects.
- StaticEventManager now extends SharedEventManager, and simply
implements a singleton pattern.
- Introduced EventManagerAware and SharedEventManagerAware interfaces;
EventManager implements the latter.
- Adds configuration to the Bootstrap in setupLocator() to mark the EventManager
as an unshared instance.
It depends on work @ralphschindler is doing in his
- s/SharedEventManagerAware/SharedEventCollectionAware/, as the
interface was typehinting on the latter.
- s/setSharedConnections/setSharedCollections/, as the latter is the
terminology in the interface
- s/sharedConnections/sharedCollections/, for the same reasons as the