Using `EventDispatcher` is useful if you need more advanced features, such as:
* Setting the priority of an event-listener
* Registering an object-oriented event-listener
* Registering a dynamic, on-the-fly event-listener
* Registering multiple listeners for the same event
* Registering for internal/unpublished events
For a general introduction or background on `EventDispatcher`, consult the [Symfony documentation](http://symfony.com/doc/2.7/components/event_dispatcher.html).
## Example: `Civi::dispatcher()`
In this case, we have a CiviCRM extension or Drupal module named `example`.
During the system initialization, we lookup the `EventDispatcher`, call
`addListener()`, and listen for `hook_civicrm_alterContent`.
```
function example_civicrm_config(&$config) {
if (!isset(Civi::$statics[__FUNCTION__])) { return; }