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 AggregateDomainEvent

DomainEvent which should be used when there is an action to be applied on a single aggregate root.

When NGS\Patterns\DomainEvent affects only a single aggregate, then we can use specialized aggregate domain event. This event can't have side effects outside aggregate, which allows it to be replayed when it's asynchronous. This is useful in write intensive scenarios to minimize write load in the database, but will increase read load, because reading aggregate will have to read all it's unapplied events and apply them during reconstruction.

AggregateDomainEvent is defined in DSL with keyword event.

module Todo {
  aggregate Task;
  event<Task> MarkDone;
}
Abstract
Namespace: NGS\Patterns
Located at Patterns/AggregateDomainEvent.php
Methods summary
public NGS\Patterns\AggregateRoot
# submit( NGS\Patterns\AggregateRoot $value = null )

Applies event to aggregate root object

Applies event to aggregate root object

Parameters

$value
NGS\Patterns\AggregateRoot
$value Aggregate instance on which event will be applied

Returns

NGS\Patterns\AggregateRoot
Aggregate with updated values after the event was executed

Throws

InvalidArgumentException
API documentation generated by ApiGen 2.8.0