StoppableEventInterface.php 785 B

1234567891011121314151617181920212223242526
  1. <?php
  2. declare(strict_types=1);
  3. namespace Psr\EventDispatcher;
  4. /**
  5. * An Event whose processing may be interrupted when the event has been handled.
  6. *
  7. * A Dispatcher implementation MUST check to determine if an Event
  8. * is marked as stopped after each listener is called. If it is then it should
  9. * return immediately without calling any further Listeners.
  10. */
  11. interface StoppableEventInterface
  12. {
  13. /**
  14. * Is propagation stopped?
  15. *
  16. * This will typically only be used by the Dispatcher to determine if the
  17. * previous listener halted propagation.
  18. *
  19. * @return bool
  20. * True if the Event is complete and no further listeners should be called.
  21. * False to continue calling listeners.
  22. */
  23. public function isPropagationStopped() : bool;
  24. }