Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 67c522b

Browse files
committed
feat: Adds EventDispatchingInterface
Basically, a counterpart to the current EventManagerAwareInterface, but for EventDispatcherInterface composition. Also revises the Deprecations list, as we can keep EventManager as an EventDispatcherInterface implementation for 4.0.
1 parent 56f5641 commit 67c522b

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

TODO-PSR-14.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,10 @@
8888
- [x] it will return the event itself
8989
- [x] it will need to validate that it received an object before calling
9090
`triggerListeners`
91-
- [ ] Additional utilities
92-
- [ ] `EventDispatchingInterface` with a `getEventDispatcher()` method
93-
- [ ] Alternate dispatcher implementation, `EventDispatcher`
94-
- [ ] Should accept a listener provider interface to its constructor
95-
- [ ] Should implement `EventDispatcherInterface` via duck-typing: it will
96-
implement a `dispatch()` method only
91+
- [x] Additional utilities
92+
- [x] `EventDispatchingInterface` with a `getEventDispatcher()` method
9793
- [ ] Deprecations
9894
- [ ] `EventInterface`
99-
- [ ] `EventManager`
10095
- [ ] `EventManagerInterface`
10196
- [ ] `EventManagerAwareInterface`
10297
- [ ] `EventManagerAwareTrait`
@@ -117,7 +112,6 @@
117112

118113
- [ ] Removals
119114
- [ ] `EventInterface`
120-
- [ ] `EventManager`
121115
- [ ] `EventManagerInterface`
122116
- [ ] `EventManagerAwareInterface`
123117
- [ ] `EventManagerAwareTrait`

src/EventDispatchingInterface.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* @see https://github.com/zendframework/zend-eventmanager for the canonical source repository
4+
* @copyright Copyright (c) 2019 Zend Technologies USA Inc. (https://www.zend.com)
5+
* @license https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md New BSD License
6+
*/
7+
8+
namespace Zend\EventManager;
9+
10+
interface EventDispatchingInterface
11+
{
12+
/**
13+
* @return EventDispatcherInterface
14+
*/
15+
public function getEventDispatcher();
16+
}

0 commit comments

Comments
 (0)