@@ -62,6 +62,9 @@ public function __construct($identifiers = null)
6262 /**
6363 * Set the event class to utilize
6464 *
65+ * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
66+ * See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
67+ * for details.
6568 * @param string $class
6669 * @return EventManager
6770 */
@@ -74,6 +77,9 @@ public function setEventClass($class)
7477 /**
7578 * Set shared event manager
7679 *
80+ * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
81+ * See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
82+ * for details.
7783 * @param SharedEventManagerInterface $sharedEventManager
7884 * @return EventManager
7985 */
@@ -87,6 +93,9 @@ public function setSharedManager(SharedEventManagerInterface $sharedEventManager
8793 /**
8894 * Remove any shared event manager currently attached
8995 *
96+ * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
97+ * See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
98+ * for details.
9099 * @return void
91100 */
92101 public function unsetSharedManager ()
@@ -212,12 +221,14 @@ public function trigger($event, $target = null, $argv = [], $callback = null)
212221 * Triggers listeners until the provided callback evaluates the return
213222 * value of one as true, or until all listeners have been executed.
214223 *
224+ * @deprecated The signature of this method will change in 3.0.0.
225+ * See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/changed.md}
226+ * for details.
215227 * @param string|EventInterface $event
216228 * @param string|object $target Object calling emit, or symbol describing target (such as static method name)
217229 * @param array|ArrayAccess $argv Array of arguments; typically, should be associative
218230 * @param callable $callback
219231 * @return ResponseCollection
220- * @deprecated Please use trigger()
221232 * @throws Exception\InvalidCallbackException if invalid callable provided
222233 */
223234 public function triggerUntil ($ event , $ target , $ argv = null , $ callback = null )
@@ -229,6 +240,29 @@ public function triggerUntil($event, $target, $argv = null, $callback = null)
229240 return $ this ->trigger ($ event , $ target , $ argv , $ callback );
230241 }
231242
243+ /**
244+ * Trigger an event instance.
245+ *
246+ * @param EventInterface $event
247+ * @return ResponseCollection
248+ */
249+ public function triggerEvent (EventInterface $ event )
250+ {
251+ return $ this ->triggerListeners ($ event ->getName (), $ event );
252+ }
253+
254+ /**
255+ * Trigger an event instance, short-circuiting if a listener response evaluates true via the callback.
256+ *
257+ * @param callable $callback
258+ * @param EventInterface $event
259+ * @return ResponseCollection
260+ */
261+ public function triggerEventUntil (callable $ callback , EventInterface $ event )
262+ {
263+ return $ this ->triggerListeners ($ event ->getName (), $ event , $ callback );
264+ }
265+
232266 /**
233267 * Attach a listener to an event
234268 *
@@ -293,6 +327,9 @@ public function attach($event, $callback = null, $priority = 1)
293327 * one or more times, typically to attach to multiple events using local
294328 * methods.
295329 *
330+ * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
331+ * See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
332+ * for details.
296333 * @param ListenerAggregateInterface $aggregate
297334 * @param int $priority If provided, a suggested priority for the aggregate to use
298335 * @return mixed return value of {@link ListenerAggregateInterface::attach()}
@@ -343,6 +380,9 @@ public function detach($listener)
343380 * Listener aggregates accept an EventManagerInterface instance, and call detach()
344381 * of all previously attached listeners.
345382 *
383+ * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
384+ * See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
385+ * for details.
346386 * @param ListenerAggregateInterface $aggregate
347387 * @return mixed return value of {@link ListenerAggregateInterface::detach()}
348388 */
@@ -354,6 +394,9 @@ public function detachAggregate(ListenerAggregateInterface $aggregate)
354394 /**
355395 * Retrieve all registered events
356396 *
397+ * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
398+ * See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
399+ * for details.
357400 * @return array
358401 */
359402 public function getEvents ()
@@ -364,6 +407,9 @@ public function getEvents()
364407 /**
365408 * Retrieve all listeners for a given event
366409 *
410+ * @deprecated This method is deprecated with 2.6.0, and will be removed in 3.0.0.
411+ * See {@link https://github.com/zendframework/zend-eventmanager/blob/develop/doc/book/migration/removed.md}
412+ * for details.
367413 * @param string $event
368414 * @return PriorityQueue
369415 */
0 commit comments