EventSubscriberInterface.php 605 B

12345678910111213141516171819202122
  1. <?php
  2. namespace JMS\SerializerBundle\Serializer\EventDispatcher;
  3. interface EventSubscriberInterface
  4. {
  5. /**
  6. * Returns the events to which this class has subscribed.
  7. *
  8. * Return format:
  9. * array(
  10. * array('event' => 'the-event-name', 'method' => 'onEventName', 'class' => 'some-class', 'format' => 'json'),
  11. * array(...),
  12. * )
  13. *
  14. * The class may be omitted if the class wants to subscribe to events of all classes.
  15. * Same goes for the format key.
  16. *
  17. * @return array
  18. */
  19. public static function getSubscribedEvents();
  20. }