Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are event handler, event listener, and event registration all referring to the same thing?

If not, what is their difference?

like image 252
ppecher Avatar asked Feb 22 '11 15:02

ppecher


1 Answers

The Event Handler is the method that gets called to handle the Event.

The Event Listener is the mechanism that listens for the Event to happen. It then calls the Event Handlers.

Event Registration is the process by which an Event Handler gets registered with an Event Listener so that the handler is called when the Event Listener fires the event.

like image 190
Justin Niessner Avatar answered Oct 13 '22 04:10

Justin Niessner