AggregateEvent

Extends \Ascmvc\EventSourcing\Event\Event

Class AggregateEvent

package

Ascmvc\EventSourcing\Event

Methods

AggregateEvent constructor.

__construct(\Ascmvc\EventSourcing\AggregateImmutableValueObject $aggregateValueObject, null $aggregateRootName = null, null $name = null, null $target = null, null $params = null) 

Arguments

$aggregateRootName

null

$name

null

$target

null

$params

null

Gets the name of the aggregate root that created the event.

getAggregateRootName() : null|string

Response

null|string

Gets the event's immutable value object.

getAggregateValueObject() : \Ascmvc\EventSourcing\AggregateImmutableValueObject

Returns the instance of the application.

getApplication() : \Ascmvc\AbstractApp
inherited

Gets the event type.

getEventType() : integer

Response

integer

DEPRECATED - Use getAggregateRootName() instead - Will be removed in 4.0.0.

getRootAggregateName() : null|string

Gets the name of the aggregate root that created the event.

Response

null|string

Propagation is never stopped.

propagationIsStopped() : boolean
inherited

Response

boolean

Sets the event's immutable value object.

setAggregateValueObject(\Ascmvc\EventSourcing\AggregateImmutableValueObject $aggregateValueObject) : \Ascmvc\EventSourcing\Event\AggregateEvent

Stores the instance of the application.

setApplication(\Ascmvc\AbstractApp &$application) : \Ascmvc\AbstractApp
inherited

Arguments

$application

\Ascmvc\AbstractApp

Response

\Ascmvc\AbstractApp

Event propagation is not stoppable.

stopPropagation(boolean $flag = true) : boolean
inherited

Arguments

$flag

boolean

Response

boolean

Constants

Type of event.

TYPE

1: Regular event 4: Read event 6: Write event

Properties

Contains an instance of AggregateImmutableValueObject.

aggregateValueObject : \Ascmvc\EventSourcing\AggregateImmutableValueObject

Contains the name of the bounded context (event sourcing aggregate).

aggregateRootName : null|string
var

Type(s)

null|string

The instance of the application.

application : \Ascmvc\AbstractApp
inherited
var

Type(s)

\Ascmvc\AbstractApp