EventSubscriber.php 504 B

123456789101112131415161718192021
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Common;
  4. /**
  5. * An EventSubscriber knows himself what events he is interested in.
  6. * If an EventSubscriber is added to an EventManager, the manager invokes
  7. * {@link getSubscribedEvents} and registers the subscriber as a listener for all
  8. * returned events.
  9. */
  10. interface EventSubscriber
  11. {
  12. /**
  13. * Returns an array of events this subscriber wants to listen to.
  14. *
  15. * @return string[]
  16. */
  17. public function getSubscribedEvents();
  18. }