PHPackages                             ashleydawson/domain-event-dispatcher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ashleydawson/domain-event-dispatcher

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ashleydawson/domain-event-dispatcher
====================================

Dispatch or defer domain events from a singleton. Handy if you're using DDD and need a singleton domain dispatcher for models.

1.0.6(9y ago)118.7k1MITPHPPHP &gt;=5.5

Since Dec 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/AshleyDawson/DomainEventDispatcher)[ Packagist](https://packagist.org/packages/ashleydawson/domain-event-dispatcher)[ RSS](/packages/ashleydawson-domain-event-dispatcher/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (1)

Domain Event Dispatcher
=======================

[](#domain-event-dispatcher)

[![Build Status](https://camo.githubusercontent.com/f2c8784152f9cffa5d7f903bf34af82b0e3c6717739694a8428f2771c6a16e5b/68747470733a2f2f7472617669732d63692e6f72672f4173686c6579446177736f6e2f446f6d61696e4576656e74446973706174636865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/AshleyDawson/DomainEventDispatcher)

Singleton domain event dispatcher to be used during [DDD](https://en.wikipedia.org/wiki/Domain-driven_design). The domain event dispatcher is a singleton so it can be easily used from within your model.

Installation
------------

[](#installation)

Install via Composer using the following command:

```
$ composer require ashleydawson/domain-event-dispatcher

```

Basic Usage
-----------

[](#basic-usage)

Define an event to be dispatched. Event classes can be anything, and should be easily serialized.

```
