Overview

Namespaces

  • NGS
    • Client
      • Exception
    • Converter
    • Patterns
  • PHP

Classes

  • AggregateDomainEvent
  • AggregateRoot
  • CubeBuilder
  • DomainEvent
  • GenericSearch
  • Identifiable
  • OlapCube
  • Repository
  • Search
  • Searchable
  • SearchBuilder
  • Snapshot
  • Specification
  • Templater

Interfaces

  • IDomainObject
  • IIdentifiable
  • Overview
  • Namespace
  • Class
  • Tree

Class DomainEvent

Domain event represents an meaningful business event that occurred in the system. It is a message that back-end system knows how to process and that will change the state of the system.

They are preferred way of manipulating data instead of simple CRUD operations (create, update, delete). Unlike NGS\Patterns\AggregateDomainEvent which is tied to a change in a single NGS\Patterns\AggregateRoot, DomainEvent should be used when an action will result in modifications to multiple aggregates, external call (like sending an email) or some other action.

By default event will be applied immediately. If async is used, event will be stored immediately but applied later.

DomainEvent is defined in DSL with keyword event.

module Todo {
  aggregate Task;
  event MarkDone {
    Task task;
  }
}
Abstract
Namespace: NGS\Patterns
Located at Patterns/DomainEvent.php
Methods summary
public string
# submit( )

Submits event

Submits event

Returns

string
Created event URI
API documentation generated by ApiGen 2.8.0