Skip to content

Commit

Permalink
Remove stopPropagation() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crell committed Sep 14, 2018
1 parent 4328733 commit ca47d6e
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/StoppableTaskInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,23 @@
namespace Psr\EventDispatcher;

/**
* Event that can stop propagation to undispatched listeners.
* A Task whose processing may be interrupted when the task is complete.
*
* A Stoppable Dispatcher implementation MUST check to determine if an Event
* A Processor implementation MUST check to determine if a Task
* is marked as stopped after each listener is called. If it is then it should
* return immediately without calling any further Listeners.
*/
interface StoppableTaskInterface extends TaskInterface
{
/**
* Stop event propagation.
*
* Once called, when handling returns to the dispatcher, the dispatcher MUST
* stop calling any remaining listeners and return handling back to the
* target object.
*
* @return self
*/
public function stopPropagation() : self;

/**
* Is propagation stopped?
*
* This will typically only be used by the dispatcher to determine if the
* This will typically only be used by the Processor to determine if the
* previous listener halted propagation.
*
* If stopPropagation() has previously been called then this method MUST
* return true. If not, it may return true or false as appropriate.
* @return bool
* True if the Task is complete and no further listeners should be called.
* False to continue calling listeners.
*/
public function isPropagationStopped() : bool;
}

0 comments on commit ca47d6e

Please sign in to comment.