EventDispatcher Flashcards

1
Q

What are ways to react on events?

A

EventSubscriber
EventListener

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which interfaces / classes are part of the event-dispatcher component?

A
  • EventDispatcherInterface (to dispatch the event)
  • EventSubscriberInterface
  • Event
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which PSR defines the event-dispatcher component?

A

PSR-14
https://www.php-fig.org/psr/psr-14/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which method is implemented in the EventSubscriberInterface?

A

::getSubscribedEvents()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are ways to make an EventListener to listen to an Event?

A

EventListener
Registering with ->addEventListener

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to add priority to an Event-listener / -subscriber?

A

with the parameter $priority

How well did you know this?
1
Not at all
2
3
4
5
Perfectly