|
59 | 59 | - [x] with an event, can be attached to `LazyListenerSubscriber`
|
60 | 60 | - [x] Constructor aggregates `LazyListener` _instances_ only
|
61 | 61 | - [x] raises exception when `getEvent()` returns null
|
62 |
| -- [ ] Event Dispatcher implementation |
63 |
| - - [ ] Implement `PrioritizedListenerAttachmentInterface` (if BC) |
64 |
| - - [ ] Create a `PrioritizedListenerProvider` instance in the `EventManger` |
65 |
| - constructor, and have the various `attach()`, `detach()`, etc. methods |
66 |
| - proxy to it. |
67 |
| - - [ ] When triggering listeners, create a `PrioritizedAggregateListenerProvider` |
| 62 | +- [x] Adapter for SharedEventManagerInterface |
| 63 | + Since we type-hint on SharedEventManagerInterface, we need to adapt generic |
| 64 | + implementations to work as ListenerProviders. |
| 65 | + - [x] Class that adapts SharedEventManagerInterface instances to ListenerProviders |
| 66 | +- [x] Event Dispatcher implementation |
| 67 | + - [x] Implement `PrioritizedListenerAttachmentInterface` (if BC) |
| 68 | + - [x] Implement `ListenerProviderInterface` (if BC) |
| 69 | + - [x] Create a `PrioritizedListenerProvider` instance in the `EventManger` |
| 70 | + constructor |
| 71 | + - [x] Decorate it in a `PrioritizedAggregateListenerProvider` |
| 72 | + - [x] Have the various `attach()`, `detach()`, etc. methods proxy to it. |
| 73 | + - [x] Adapt any provided `SharedEventManagerInterface` instance, and add it |
| 74 | + to the `PrioritizedAggregateListenerProvider` |
| 75 | + - [x] Create a named constructor that accepts a listener provider and which |
| 76 | + then uses it internally. |
| 77 | + - [x] If the instance is a `PrioritizedListenerAttachmentInterface` |
| 78 | + instance, allow the attach/detach/clear methods to proxy to it. |
| 79 | + - [x] When triggering listeners, create a `PrioritizedAggregateListenerProvider` |
68 | 80 | with the composed `PrioritizedListenerProvider` and `SharedListenerProvider` /
|
69 | 81 | `PrioritizedIdentifierListenerProvider` implementations, in that order.
|
70 |
| - - [ ] Replace logic of `triggerListeners()` to just call |
| 82 | + - [x] Replace logic of `triggerListeners()` to just call |
71 | 83 | `getListenersForEvent()` on the provider. It can continue to aggregate the
|
72 | 84 | responses in a `ResponseCollection`
|
73 |
| - - [ ] `triggerListeners()` no longer needs to type-hint its first argument |
74 |
| - - [ ] Create a `dispatch()` method |
75 |
| - - [ ] Method will act like `triggerEvent()`, except |
76 |
| - - [ ] it will return the event itself |
77 |
| - - [ ] it will need to validate that it received an object before calling |
| 85 | + - [x] `triggerListeners()` no longer needs to type-hint its first argument |
| 86 | + - [x] Create a `dispatch()` method |
| 87 | + - [x] Method will act like `triggerEvent()`, except |
| 88 | + - [x] it will return the event itself |
| 89 | + - [x] it will need to validate that it received an object before calling |
78 | 90 | `triggerListeners`
|
79 | 91 | - [ ] Additional utilities
|
80 | 92 | - [ ] `EventDispatchingInterface` with a `getEventDispatcher()` method
|
|
0 commit comments