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

Commit 9200b59

Browse files
committed
feat: update EventManager to implement ListenerProviderInterface and PrioritizedListenerAttachmentInterface
Allows the EventManager to act as its own provider.
1 parent 6184ccf commit 9200b59

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

src/EventManager.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
* Use the EventManager when you want to create a per-instance notification
1818
* system for your objects.
1919
*/
20-
class EventManager implements EventManagerInterface
20+
class EventManager implements
21+
EventManagerInterface,
22+
ListenerProvider\ListenerProviderInterface,
23+
ListenerProvider\PrioritizedListenerAttachmentInterface
2124
{
2225
/**
2326
* Subscribed events and their listeners
@@ -196,6 +199,13 @@ public function attach($eventName, callable $listener, $priority = 1)
196199
return $listener;
197200
}
198201

202+
/**
203+
* @inheritDoc
204+
*/
205+
public function attachWildcardListener(callable $listener, $priority = 1)
206+
{
207+
}
208+
199209
/**
200210
* @inheritDoc
201211
* @throws Exception\InvalidArgumentException for invalid event types.
@@ -246,6 +256,13 @@ public function detach(callable $listener, $eventName = null, $force = false)
246256
}
247257
}
248258

259+
/**
260+
* @inheritDoc
261+
*/
262+
public function detachWildcardListener(callable $listener)
263+
{
264+
}
265+
249266
/**
250267
* @inheritDoc
251268
*/
@@ -256,6 +273,13 @@ public function clearListeners($eventName)
256273
}
257274
}
258275

276+
/**
277+
* @inheritDoc
278+
*/
279+
public function getListenersForEvent($event)
280+
{
281+
}
282+
259283
/**
260284
* Prepare arguments
261285
*

0 commit comments

Comments
 (0)