0PricingLogin
PHP Academy · Lesson

EventDispatcher: Decoupled Events

Dispatch and listen to events using Symfony's EventDispatcher.

What is EventDispatcher?

Symfony EventDispatcher implements the Observer pattern. Code dispatches events; listeners react to them — without the dispatcher knowing anything about the listeners.

Installing

Install the component.

$ composer require symfony/event-dispatcher

All lessons in this course

  1. HttpFoundation: Request and Response
  2. DependencyInjection Container
  3. EventDispatcher: Decoupled Events
  4. Console Component: CLI Commands
← Back to PHP Academy